CEPH filesystem development
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zyan@redhat.com>
To: ceph-devel@vger.kernel.org
Cc: jlayton@redhat.com, "Yan, Zheng" <zyan@redhat.com>
Subject: [PATCH] ceph: don't set st_dev to 0 for stat(2)
Date: Mon, 11 Dec 2017 16:47:58 +0800	[thread overview]
Message-ID: <20171211084758.3225-1-zyan@redhat.com> (raw)

Zero st_dev confuses ls(1) code. it make 'ls -l' not print '+' sign
for file/directory with ACL.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
---
 fs/ceph/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index c6ec5aa46100..b5529b0b77a6 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -2244,7 +2244,7 @@ int ceph_getattr(const struct path *path, struct kstat *stat,
 		if (ceph_snap(inode) != CEPH_NOSNAP)
 			stat->dev = ceph_snap(inode);
 		else
-			stat->dev = 0;
+			stat->dev = 1; /* the smallest snapid is 2 */
 		if (S_ISDIR(inode->i_mode)) {
 			if (ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb),
 						RBYTES))
-- 
2.13.6


             reply	other threads:[~2017-12-11  8:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11  8:47 Yan, Zheng [this message]
2017-12-11 11:59 ` [PATCH] ceph: don't set st_dev to 0 for stat(2) Jeff Layton
2017-12-11 12:19   ` Yan, Zheng
2017-12-11 12:42     ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171211084758.3225-1-zyan@redhat.com \
    --to=zyan@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=jlayton@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox