Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52785112 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Dave Chinner
Browse files

xfs: implement pNFS export operations



Add operations to export pNFS block layouts from an XFS filesystem.  See
the previous commit adding the operations for an explanation of them.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent bad96266
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -121,3 +121,4 @@ xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o
xfs-$(CONFIG_PROC_FS)		+= xfs_stats.o
xfs-$(CONFIG_SYSCTL)		+= xfs_sysctl.o
xfs-$(CONFIG_COMPAT)		+= xfs_ioctl32.o
xfs-$(CONFIG_NFSD_PNFS)		+= xfs_pnfs.o
+6 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include "xfs_trace.h"
#include "xfs_icache.h"
#include "xfs_log.h"
#include "xfs_pnfs.h"

/*
 * Note that we only accept fileids which are long enough rather than allow
@@ -245,4 +246,9 @@ const struct export_operations xfs_export_operations = {
	.fh_to_parent		= xfs_fs_fh_to_parent,
	.get_parent		= xfs_fs_get_parent,
	.commit_metadata	= xfs_fs_nfs_commit_metadata,
#ifdef CONFIG_NFSD_PNFS
	.get_uuid		= xfs_fs_get_uuid,
	.map_blocks		= xfs_fs_map_blocks,
	.commit_blocks		= xfs_fs_commit_blocks,
#endif
};
+6 −0
Original line number Diff line number Diff line
@@ -602,6 +602,12 @@ xfs_growfs_data(
	if (!mutex_trylock(&mp->m_growlock))
		return -EWOULDBLOCK;
	error = xfs_growfs_data_private(mp, in);
	/*
	 * Increment the generation unconditionally, the error could be from
	 * updating the secondary superblocks, in which case the new size
	 * is live already.
	 */
	mp->m_generation++;
	mutex_unlock(&mp->m_growlock);
	return error;
}
+1 −1
Original line number Diff line number Diff line
@@ -505,7 +505,7 @@ xfs_setattr_mode(
	inode->i_mode |= mode & ~S_IFMT;
}

static void
void
xfs_setattr_time(
	struct xfs_inode	*ip,
	struct iattr		*iattr)
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ extern void xfs_setup_inode(struct xfs_inode *);
 */
#define XFS_ATTR_NOACL		0x01	/* Don't call posix_acl_chmod */

extern void xfs_setattr_time(struct xfs_inode *ip, struct iattr *iattr);
extern int xfs_setattr_nonsize(struct xfs_inode *ip, struct iattr *vap,
			       int flags);
extern int xfs_setattr_size(struct xfs_inode *ip, struct iattr *vap);
Loading