From: Benny Halevy <bhalevy@panasas.com>
To: Fred Isaman <iisaman@umich.edu>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 01/19] SQUASHME: pnfs-submit: merge pnfs4_proc_setattr into nfs4_proc_setattr
Date: Thu, 17 Jun 2010 11:12:02 -0400 [thread overview]
Message-ID: <4C1A3B42.2060603@panasas.com> (raw)
In-Reply-To: <AANLkTika4BAGrDg0CnUPRy9Qji6rThr5zcZ0S8ciAr29-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Jun. 17, 2010, 11:00 -0400, Fred Isaman <iisaman@umich.edu> wrote:
> On Thu, Jun 17, 2010 at 10:48 AM, Benny Halevy <bhalevy@panasas.com> wrote:
>> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
>> ---
>> fs/nfs/nfs4proc.c | 35 +++++++++++++++--------------------
>> 1 files changed, 15 insertions(+), 20 deletions(-)
>>
>> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
>> index 8c02296..17a2597 100644
>> --- a/fs/nfs/nfs4proc.c
>> +++ b/fs/nfs/nfs4proc.c
>> @@ -2333,6 +2333,19 @@ static int nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
>> return err;
>> }
>>
>> +static void
>> +pnfs4_return_layout_on_setattr(struct inode *inode)
>> +{
>> +#ifdef CONFIG_NFS_V4_1
>> + struct nfs_server *server = NFS_SERVER(inode);
>> + struct nfs_inode *nfsi = NFS_I(inode);
>> +
>> + if (pnfs_enabled_sb(server) && has_layout(nfsi) &&
>
> pnfs_enabled_sb() is not needed given the following has_layout() test.
>
Good point. I'll remove it.
Benny
> Fred
>
>> + pnfs_ld_layoutret_on_setattr(server->pnfs_curr_ld))
>> + pnfs_return_layout(inode, NULL, NULL, RETURN_FILE, true);
>> +#endif /* CONFIG_NFS_V4_1 */
>> +}
>> +
>> /*
>> * The file is not closed if it is opened due to the a request to change
>> * the size of the file. The open call will not be needed once the
>> @@ -2359,6 +2372,8 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
>> struct nfs4_state *state = NULL;
>> int status;
>>
>> + pnfs4_return_layout_on_setattr(inode);
>> +
>> nfs_fattr_init(fattr);
>>
>> /* Search for an existing open(O_WRITE) file */
>> @@ -2378,25 +2393,6 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
>> return status;
>> }
>>
>> -#ifdef CONFIG_NFS_V4_1
>> -/*
>> - * Return layout before issueing a setattr
>> - */
>> -static int
>> -pnfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
>> - struct iattr *sattr)
>> -{
>> - struct inode *inode = dentry->d_inode;
>> - struct nfs_server *server = NFS_SERVER(inode);
>> - struct nfs_inode *nfsi = NFS_I(inode);
>> -
>> - if (pnfs_enabled_sb(server) && has_layout(nfsi) &&
>> - pnfs_ld_layoutret_on_setattr(server->pnfs_curr_ld))
>> - pnfs_return_layout(inode, NULL, NULL, RETURN_FILE, true);
>> - return nfs4_proc_setattr(dentry, fattr, sattr);
>> -}
>> -#endif /* CONFIG_NFS_V4_1 */
>> -
>> static int _nfs4_proc_lookupfh(struct nfs_server *server, const struct nfs_fh *dirfh,
>> const struct qstr *name, struct nfs_fh *fhandle,
>> struct nfs_fattr *fattr)
>> @@ -6068,7 +6064,6 @@ pnfs_v4_clientops_init(void)
>> struct nfs_rpc_ops *p = (struct nfs_rpc_ops *)&pnfs_v4_clientops;
>>
>> memcpy(p, &nfs_v4_clientops, sizeof(*p));
>> - p->setattr = pnfs4_proc_setattr;
>> p->read_done = pnfs4_read_done;
>> p->write_setup = pnfs4_proc_write_setup;
>> p->write_done = pnfs4_write_done;
>> --
>> 1.6.4.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
next prev parent reply other threads:[~2010-06-17 15:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 14:47 [PATCH 0/19]: merge pnfs client ops into nfs4's Benny Halevy
2010-06-17 14:48 ` [PATCH 01/19] SQUASHME: pnfs-submit: merge pnfs4_proc_setattr into nfs4_proc_setattr Benny Halevy
2010-06-17 15:00 ` Fred Isaman
[not found] ` <AANLkTika4BAGrDg0CnUPRy9Qji6rThr5zcZ0S8ciAr29-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-17 15:12 ` Benny Halevy [this message]
2010-06-17 14:48 ` [PATCH 02/19] SQUASHME: pnfs4_read_done status variable is unused Benny Halevy
2010-06-17 14:48 ` [PATCH 03/19] SQUASHME: pnfs-submit: optionally pass nfs_client to nfs4_async_handle_error Benny Halevy
2010-06-17 14:48 ` [PATCH 04/19] SQUASHME: pnfs-submit: merge pnfs4_read_done into nfs4_read_done - part 1 Benny Halevy
2010-06-17 15:09 ` Fred Isaman
2010-06-17 14:49 ` [PATCH 05/19] SQUASHME: pnfs-submit: merge pnfs4_read_done into nfs4_read_done - part 2 Benny Halevy
2010-06-17 14:49 ` [PATCH 06/19] SQUASHME: pnfs-submit: merge pnfs4_read_done into nfs4_read_done - part 3 Benny Halevy
2010-06-17 15:15 ` Fred Isaman
[not found] ` <AANLkTikvo8qP_B23suRB-lKNCcCQv4W6Vw8kBmPC_6SX-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-17 15:26 ` Benny Halevy
2010-06-17 14:49 ` [PATCH 07/19] SQUASHME: pnfs-submit: get rid of pnfs4_read_done Benny Halevy
2010-06-17 14:49 ` [PATCH 08/19] SQUASHME: pnfs-submit: merge pnfs4_write_done into nfs4_write_done - part 1 Benny Halevy
2010-06-17 14:49 ` [PATCH 09/19] SQUASHME: pnfs-submit: merge pnfs4_write_done into nfs4_write_done - part 2 Benny Halevy
2010-06-17 15:19 ` Fred Isaman
[not found] ` <AANLkTimHng4urMH5CTn68aZJ_NKIasCH6VJOTCI-2zRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-17 15:27 ` Benny Halevy
2010-06-17 14:49 ` [PATCH 10/19] SQUASHME: pnfs-submit: merge pnfs4_write_done into nfs4_write_done - part 3 Benny Halevy
2010-06-17 14:50 ` [PATCH 11/19] SQUASHME: pnfs-submit: merge pnfs4_write_done into nfs4_write_done - part 4 Benny Halevy
2010-06-17 14:50 ` [PATCH 12/19] SQUASHME: pnfs-submit: get rid of pnfs4_write_done Benny Halevy
2010-06-17 14:50 ` [PATCH 13/19] SQUASHME: pnfs-submit: merge pnfs4_commit_done into nfs4_commit_done - part 1 Benny Halevy
2010-06-17 14:50 ` [PATCH 14/19] SQUASHME: pnfs-submit: merge pnfs4_commit_done into nfs4_commit_done - part 2 Benny Halevy
2010-06-17 14:50 ` [PATCH 15/19] SQUASHME: pnfs-submit: merge pnfs4_commit_done into nfs4_commit_done - part 3 Benny Halevy
2010-06-17 14:51 ` [PATCH 16/19] SQUASHME: pnfs-submit: get rid of pnfs4_commit_done Benny Halevy
2010-06-17 14:51 ` [PATCH 17/19] SQUASHME: pnfs-submit: merge pnfs4_proc_write_setup into nfs4_proc_write_setup Benny Halevy
2010-06-17 14:51 ` [PATCH 18/19] SQUASHME: pnfs-submit: merge pnfs4_proc_commit_setup into nfs4_proc_commit_setup Benny Halevy
2010-06-17 14:51 ` [PATCH 19/19] SQUASHME: pnfs-submit: get rid of pnfs_v4_clientops Benny Halevy
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=4C1A3B42.2060603@panasas.com \
--to=bhalevy@panasas.com \
--cc=iisaman@umich.edu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.