]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
rbd: increase maximum snapshot name length
authorAlex Elder <elder@inktank.com>
Tue, 3 Jul 2012 21:01:19 +0000 (16:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:46:49 +0000 (08:46 -0800)
commitfefc034ae0af85c0b18fe209a1b6803d51880556
tree34c6c986f149c8993dac84debc476d2a078fcc08
parentd741dc0695e62bcd1b7cfc7a8baa1f9e95fd07c7
rbd: increase maximum snapshot name length

(cherry picked from commit d4b125e9eb43babd14538ba61718e3db71a98d29)

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: Alex Elder <elder@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/rbd.c