From: Benny Halevy <benny@tonian.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH] pnfsd: add support for per-file layout_types attribute
Date: Thu, 23 Feb 2012 10:35:25 -0800 [thread overview]
Message-ID: <1330022125-15809-1-git-send-email-bhalevy@tonian.com> (raw)
Currently, just return the same per-fs layout types
Signed-off-by: Benny Halevy <bhalevy@tonian.com>
---
fs/nfsd/nfs4xdr.c | 3 ++-
fs/nfsd/nfsd.h | 2 +-
include/linux/nfs4.h | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index f2e4ec3..38a957b 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2560,7 +2560,8 @@ static __be32 fattr_handle_absent_fs(u32 *bmval0, u32 *bmval1, u32 *rdattr_err)
WRITE64(stat.ino);
}
#if defined(CONFIG_PNFSD)
- if (bmval1 & FATTR4_WORD1_FS_LAYOUT_TYPES) {
+ if ((bmval1 & FATTR4_WORD1_FS_LAYOUT_TYPES) ||
+ (bmval2 & FATTR4_WORD2_LAYOUT_TYPES)) {
struct super_block *sb = dentry->d_inode->i_sb;
int type = 0;
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 5d4b0e6..c262762 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -326,7 +326,7 @@ static inline void nfs4_reset_lease(time_t leasetime) { }
#if defined(CONFIG_PNFSD)
#define NFSD4_1_SUPPORTED_ATTRS_WORD2 \
(NFSD4_SUPPORTED_ATTRS_WORD2 | FATTR4_WORD2_SUPPATTR_EXCLCREAT | \
- FATTR4_WORD2_LAYOUT_BLKSIZE)
+ FATTR4_WORD2_LAYOUT_TYPES | FATTR4_WORD2_LAYOUT_BLKSIZE)
#else /* CONFIG_PNFSD */
#define NFSD4_1_SUPPORTED_ATTRS_WORD2 \
(NFSD4_SUPPORTED_ATTRS_WORD2 | FATTR4_WORD2_SUPPATTR_EXCLCREAT)
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index 97605bc..0ad26b5 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -542,6 +542,7 @@ enum lock_type4 {
#define FATTR4_WORD1_TIME_MODIFY_SET (1UL << 22)
#define FATTR4_WORD1_MOUNTED_ON_FILEID (1UL << 23)
#define FATTR4_WORD1_FS_LAYOUT_TYPES (1UL << 30)
+#define FATTR4_WORD2_LAYOUT_TYPES (1UL << 0)
#define FATTR4_WORD2_LAYOUT_BLKSIZE (1UL << 1)
#define NFSPROC4_NULL 0
--
1.7.6.5
reply other threads:[~2012-02-23 18:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1330022125-15809-1-git-send-email-bhalevy@tonian.com \
--to=benny@tonian.com \
--cc=linux-nfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).