xfs
[Top] [All Lists]

[PATCH] xfs: don't hand out pNFS layouts for reflink inodes

To: darrick.wong@xxxxxxxxxx
Subject: [PATCH] xfs: don't hand out pNFS layouts for reflink inodes
From: Christoph Hellwig <hch@xxxxxx>
Date: Wed, 2 Mar 2016 17:34:45 +0100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Although the protocol allows for it, the Linux NFS server code doesn't
support reflink-like functionality yet.  It's been added to by TODO
list..

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 fs/xfs/xfs_pnfs.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c
index ade236e..9708fef 100644
--- a/fs/xfs/xfs_pnfs.c
+++ b/fs/xfs/xfs_pnfs.c
@@ -139,6 +139,13 @@ xfs_fs_map_blocks(
                return -ENXIO;
 
        /*
+        * The pNFS block layout spec actually supports reflink like
+        * functionality, but the Linux pNFS server doesn't implement it yet.
+        */
+       if (!xfs_is_reflink_inode(ip))
+               return -ENXIO;
+
+       /*
         * Lock out any other I/O before we flush and invalidate the pagecache,
         * and then hand out a layout to the remote system.  This is very
         * similar to direct I/O, except that the synchronization is much more
-- 
2.1.4

<Prev in Thread] Current Thread [Next in Thread>