• I
    ceph: kill ceph_empty_snapc · 34b759b4
    Ilya Dryomov 提交于
    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 86056090 ("ceph: avoid
    sending unnessesary FLUSHSNAP message") and 23078637 ("ceph: fix
    queuing inode to mdsdir's snaprealm").
    Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
    Reviewed-by: NYan, Zheng <zyan@redhat.com>
    34b759b4
snap.c 27.3 KB