• Ilya Dryomov's avatar
    libceph: add support for CEPH_OSD_OP_SETALLOCHINT osd op · c647b8a8
    Ilya Dryomov authored
    This is primarily for rbd's benefit and is supposed to combat
    fragmentation:
    
    "... knowing that rbd images have a 4m size, librbd can pass a hint
    that will let the osd do the xfs allocation size ioctl on new files so
    that they are allocated in 1m or 4m chunks.  We've seen cases where
    users with rbd workloads have very high levels of fragmentation in xfs
    and this would mitigate that and probably have a pretty nice
    performance benefit."
    
    SETALLOCHINT is considered advisory, so our backwards compatibility
    mechanism here is to set FAILOK flag for all SETALLOCHINT ops.
    Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
    Reviewed-by: default avatarSage Weil <sage@inktank.com>
    Reviewed-by: default avatarAlex Elder <elder@linaro.org>
    c647b8a8
osd_client.c 75.5 KB