LLAPI_LAYOUT_EXTENSION_SIZE_GET(3)

NAME
llapi_layout_extension_size_get, llapi_layout_extension_size_set - get or set the extension size of an extension component of a Lustre file

SYNOPSIS
#include <lustre/lustreapi.h>

int llapi_layout_extension_size_get(const struct llapi_layout *layout,
                                    uint64_t *ext_size);

int llapi_layout_extension_size_set(struct llapi_layout *layout,
                                    uint64_t ext_size);

DESCRIPTION
The extension size is the unit of increase the previous component size when writing within the region of the current extension component. At the time of the change the OSTs of the previous component layout are checked if they have at least ext_size free space. In case there is not enough free space, the space covered by the extension component spills over to the next component (see examples in lfs-setstripe(1)).

In case of a random write to a middle of the extension component, the extension happens from the beginning of the extension component up to the current writing position plus the ext_size. However, the check for low space is still done for the ext_size.

llapi_layout_extension_size_get() stores into ext_size the extension size of layout.

llapi_layout_extension_size_get() sets the extension size of layout to ext_size.

RETURN VALUES
llapi_layout_extension_size_get() and llapi_layout_extension_size_set() return 0 on success, or -1 if an error occurred (in which case, errno is set appropriately).

ERRORS

EINVAL
    An invalid argument was specified.

AVAILABILITY
llapi_layout_extension_size_get() and llapi_layout_extension_size_set() are part of the lustre(7) user application interface library since release 2.13.0.

SEE ALSO
lfs-setstripe(1), llapi_layout_alloc(3), llapi_layout_file_open(3), llapi_layout_stripe_size_get(3), llapi_layout_stripe_size_set(3), llapi_layout(7), lustreapi(7)