]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: always provide the file type in stx_mode 11093/head
authorJeff Layton <jlayton@redhat.com>
Mon, 19 Sep 2016 17:02:45 +0000 (13:02 -0400)
committerJeff Layton <jlayton@redhat.com>
Tue, 20 Sep 2016 10:26:52 +0000 (06:26 -0400)
The proposed statx interface does this, and this would allow ganesha
to get away without requesting CEPH_STATX_MODE when all it wants is
enough to instantiate a filehandle.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc

index f431b60d9a519a665124b67df8c66f19f8076969..6a31bd1730290754bf6b87034c9a15e2f650a126 100644 (file)
@@ -6852,6 +6852,7 @@ void Client::fill_statx(Inode *in, unsigned int mask, struct ceph_statx *stx)
   /* These are always considered to be available */
   stx->stx_dev = in->snapid;
   stx->stx_blksize = MAX(in->layout.stripe_unit, 4096);
+  stx->stx_mode = S_IFMT & in->mode;
 
   if (use_faked_inos())
    stx->stx_ino = in->faked_ino;