• Alex Elder's avatar
    rbd: increase maximum snapshot name length · d4b125e9
    Alex Elder authored
    Change RBD_MAX_SNAP_NAME_LEN to be based on NAME_MAX.  That is a
    practical limit for the length of a snapshot name (based on the
    presence of a directory using the name under /sys/bus/rbd to
    represent the snapshot).
    
    The /sys entry is created by prefixing it with "snap_"; define that
    prefix symbolically, and take its length into account in defining
    the snapshot name length limit.
    
    Enforce the limit in rbd_add_parse_args().  Also delete a dout()
    call in that function that was not meant to be committed.
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarDan Mick <dan.mick@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    d4b125e9
rbd.c 77.1 KB