]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds/Server: fix LOOKUPSNAP
authorSage Weil <sage@inktank.com>
Fri, 28 Jun 2013 19:51:07 +0000 (12:51 -0700)
committerGreg Farnum <greg@inktank.com>
Thu, 26 Sep 2013 00:08:23 +0000 (17:08 -0700)
commit3cffff2a1abd266abbbc97effd73b79695d29682
treefb3ca468af7dc2d1cea8e3be5f03b805cda1e970
parent52c7f2796397b5e3aa24c24bf0c6615cadf927c6
mds/Server: fix LOOKUPSNAP

The current LOOKUPSNAP code path was dereferencing mdr->dn[0] and getting
SEGV.  Instead, set the do_lookup arg to false for getattr so that we do
not try to dereference this; for snaps it will always be NULL as we are
constructing a fake namespace for the .snap directory.  (This happens in
the path_traverse, the result of which is to set snapid--without any real
dentry).

With this fix, snaptest-0.sh passes.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/mds/Server.cc