[pnfs] [PATCH 16/28] pnfs: remove nfs4_pnfs_fsinfo_bitmap
Benny Halevy
bhalevy at panasas.com
Thu Mar 13 09:19:58 EDT 2008
Applied onto the pnfs branch.
Thanks!
Benny
On Mar. 11, 2008, 21:31 +0200, Fred Isaman <iisaman at citi.umich.edu> wrote:
> Removing a redundant ifdef causes nfs4_pnfs_fsinfo_bitmap and its
> many dependencies to be no longer necessary.
>
> Note however that this does complicate a future patch dealing with 3-word
> bitmaps, since they can not be nicely segregated into nfs4_pnfs_fsinfo_bitmap.
>
> Signed-off-by: Fred Isaman <iisaman at citi.umich.edu>
> ---
> fs/nfs/nfs4_fs.h | 3 ---
> fs/nfs/nfs4proc.c | 10 +---------
> fs/nfs/nfs4xdr.c | 24 ------------------------
> 3 files changed, 1 insertions(+), 36 deletions(-)
>
> diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
> index 1fd80e9..0da41a7 100644
> --- a/fs/nfs/nfs4_fs.h
> +++ b/fs/nfs/nfs4_fs.h
> @@ -220,9 +220,6 @@ extern const u32 nfs4_fattr_bitmap[2];
> extern const u32 nfs4_statfs_bitmap[2];
> extern const u32 nfs4_pathconf_bitmap[2];
> extern const u32 nfs4_fsinfo_bitmap[2];
> -#ifdef CONFIG_PNFS
> -extern const u32 nfs4_pnfs_fsinfo_bitmap[2];
> -#endif /* CONFIG_PNFS */
> extern const u32 nfs4_fs_locations_bitmap[2];
>
> /* nfs4renewd.c */
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 2db50bf..b20c07a 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -125,8 +125,7 @@ const u32 nfs4_pathconf_bitmap[2] = {
> 0
> };
>
> -#ifdef CONFIG_PNFS
> -const u32 nfs4_pnfs_fsinfo_bitmap[2] = { FATTR4_WORD0_MAXFILESIZE
> +const u32 nfs4_fsinfo_bitmap[2] = { FATTR4_WORD0_MAXFILESIZE
> | FATTR4_WORD0_MAXREAD
> | FATTR4_WORD0_MAXWRITE
> | FATTR4_WORD0_LEASE_TIME,
> @@ -136,13 +135,6 @@ const u32 nfs4_pnfs_fsinfo_bitmap[2] = { FATTR4_WORD0_MAXFILESIZE
> 0
> #endif /* CONFIG_PNFS */
> };
> -#endif /* CONFIG_PNFS */
> -
> -const u32 nfs4_fsinfo_bitmap[2] = { FATTR4_WORD0_MAXFILESIZE
> - | FATTR4_WORD0_MAXREAD
> - | FATTR4_WORD0_MAXWRITE
> - | FATTR4_WORD0_LEASE_TIME
> -};
>
> const u32 nfs4_fs_locations_bitmap[2] = {
> FATTR4_WORD0_TYPE
> diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
> index 7d05609..d3026ac 100644
> --- a/fs/nfs/nfs4xdr.c
> +++ b/fs/nfs/nfs4xdr.c
> @@ -1091,12 +1091,6 @@ static int encode_fsinfo(struct xdr_stream *xdr, const u32* bitmask)
> }
>
> #ifdef CONFIG_PNFS
> -static int encode_pnfs_fsinfo(struct xdr_stream *xdr, const u32 *bitmask)
> -{
> - return encode_getattr_two(xdr, bitmask[0] & nfs4_fsinfo_bitmap[0],
> - bitmask[1] & nfs4_pnfs_fsinfo_bitmap[1]);
> -}
> -
> /*
> * Encode request to commit a pNFS layout. Sent to the MDS
> */
> @@ -3064,19 +3058,6 @@ static int nfs4_xdr_enc_fsinfo(struct xdr_stream *xdr, struct nfs4_fsinfo_arg *a
> return status;
> }
>
> -#ifdef CONFIG_PNFS
> -static int nfs4_xdr_enc_pnfs_fsinfo(struct xdr_stream *xdr,
> - struct nfs4_fsinfo_arg *args)
> -{
> - int status;
> -
> - status = encode_putfh(xdr, args->fh);
> - if (!status)
> - status = encode_pnfs_fsinfo(xdr, args->bitmask);
> - return status;
> -}
> -#endif /* CONFIG_PNFS */
> -
> static int nfs40_xdr_enc_fsinfo(struct rpc_rqst *req, __be32 *p, struct nfs4_fsinfo_arg *args)
> {
> struct xdr_stream xdr;
> @@ -3102,12 +3083,7 @@ static int nfs41_xdr_enc_fsinfo(struct rpc_rqst *req, __be32 *p,
> xdr_init_encode(&xdr, &req->rq_snd_buf, p);
> encode_compound_hdr(&xdr, &hdr, 1);
> encode_sequence(&xdr, &args->seq_args);
> -
> -#ifdef CONFIG_PNFS
> - return nfs4_xdr_enc_pnfs_fsinfo(&xdr, args);
> -#else
> return nfs4_xdr_enc_fsinfo(&xdr, args);
> -#endif /* CONFIG_PNFS */
> }
> #endif /* CONFIG_NFS_V4_1 */
>
More information about the pNFS
mailing list