Skip to content

Commit

Permalink
[XFS] kill struct xfs_mount_args
Browse files Browse the repository at this point in the history
No need to parse the mount option into a structure before applying it to
struct xfs_mount.

The content of xfs_start_flags gets merged into xfs_parseargs. Calls
inbetween don't care and can use mount members instead of the args struct.

This patch uncovered that the mount option for shared filesystems wasn't
ever exposed on Linux. The code to handle it is #if 0'ed in this patch
pending a decision on this feature. I'll send a writeup about it to the
list soon.

SGI-PV: 987246

SGI-Modid: xfs-linux-melb:xfs-kern:32371a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
  • Loading branch information
Christoph Hellwig authored and Lachlan McIlroy committed Oct 30, 2008
1 parent 5a792c4 commit 9d565ff
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 426 deletions.
499 changes: 189 additions & 310 deletions fs/xfs/linux-2.6/xfs_super.c

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion fs/xfs/quota/xfs_qm.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_clnt.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/quota/xfs_qm_bhv.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_clnt.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
Expand Down
105 changes: 0 additions & 105 deletions fs/xfs/xfs_clnt.h

This file was deleted.

5 changes: 2 additions & 3 deletions fs/xfs/xfs_dmops.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "xfs_inum.h"
#include "xfs_ag.h"
#include "xfs_mount.h"
#include "xfs_clnt.h"


static struct xfs_dmops xfs_dmcore_stub = {
Expand All @@ -38,9 +37,9 @@ static struct xfs_dmops xfs_dmcore_stub = {
};

int
xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
xfs_dmops_get(struct xfs_mount *mp)
{
if (args->flags & XFSMNT_DMAPI) {
if (mp->m_flags & XFS_MOUNT_DMAPI) {
cmn_err(CE_WARN,
"XFS: dmapi support not available in this kernel.");
return EINVAL;
Expand Down
4 changes: 2 additions & 2 deletions fs/xfs/xfs_mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,9 @@ extern void xfs_freesb(xfs_mount_t *);
extern int xfs_fs_writable(xfs_mount_t *);
extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t);

extern int xfs_dmops_get(struct xfs_mount *, struct xfs_mount_args *);
extern int xfs_dmops_get(struct xfs_mount *);
extern void xfs_dmops_put(struct xfs_mount *);
extern int xfs_qmops_get(struct xfs_mount *, struct xfs_mount_args *);
extern int xfs_qmops_get(struct xfs_mount *);
extern void xfs_qmops_put(struct xfs_mount *);

extern struct xfs_dmops xfs_dmcore_xfs;
Expand Down
5 changes: 2 additions & 3 deletions fs/xfs/xfs_qmops.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "xfs_mount.h"
#include "xfs_quota.h"
#include "xfs_error.h"
#include "xfs_clnt.h"


STATIC struct xfs_dquot *
Expand Down Expand Up @@ -131,9 +130,9 @@ static struct xfs_qmops xfs_qmcore_stub = {
};

int
xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
xfs_qmops_get(struct xfs_mount *mp)
{
if (args->flags & (XFSMNT_UQUOTA | XFSMNT_PQUOTA | XFSMNT_GQUOTA)) {
if (XFS_IS_QUOTA_RUNNING(mp)) {
#ifdef CONFIG_XFS_QUOTA
mp->m_qm_ops = &xfs_qmcore_xfs;
#else
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include "xfs_extfree_item.h"
#include "xfs_acl.h"
#include "xfs_attr.h"
#include "xfs_clnt.h"
#include "xfs_mru_cache.h"
#include "xfs_filestream.h"
#include "xfs_fsops.h"
Expand Down

0 comments on commit 9d565ff

Please sign in to comment.