]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: kill ceph_empty_snapc
authorIlya Dryomov <idryomov@gmail.com>
Tue, 16 Feb 2016 14:00:24 +0000 (15:00 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 25 Mar 2016 17:51:52 +0000 (18:51 +0100)
commitf749ce33dfb3f3cec647d9f17fc5735a2e5c317f
tree02c1f45f274762ab91fd180e928aedb93612c5a5
parentede73be7604a1e4388ceb3856fd28bd59a2d9487
ceph: kill ceph_empty_snapc

ceph_empty_snapc->num_snaps == 0 at all times.  Passing such a snapc to
ceph_osdc_alloc_request() (possibly through ceph_osdc_new_request()) is
equivalent to passing NULL, as ceph_osdc_alloc_request() uses it only
for sizing the request message.

Further, in all four cases the subsequent ceph_osdc_build_request() is
passed NULL for snapc, meaning that 0 is encoded for seq and num_snaps
and making ceph_empty_snapc entirely useless.  The two cases where it
actually mattered were removed in commits 2aa0001b09f1 ("ceph: avoid
sending unnessesary FLUSHSNAP message") and bca31e2dbf93 ("ceph: fix
queuing inode to mdsdir's snaprealm").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/addr.c
fs/ceph/snap.c
fs/ceph/super.c
fs/ceph/super.h