]> 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)
commite8249fae0a975e033b8981f4aab5856a96f7787a
tree02c1f45f274762ab91fd180e928aedb93612c5a5
parent97d0b697a6d22b765b130138a7247a5b987b4144
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 e8c21ac1fcd5 ("ceph: avoid
sending unnessesary FLUSHSNAP message") and 67d2c7b7a33f ("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