[pnfs] [PATCH 04/11] pnfs: nfs_redirty_request
Fredric Isaman
iisaman at citi.umich.edu
Mon Apr 14 09:55:28 EDT 2008
On Sun, 13 Apr 2008, Benny Halevy wrote:
> On Apr. 10, 2008, 17:05 +0300, Fred Isaman <iisaman at citi.umich.edu> wrote:
>> If a request fails to flush and needs to be redirtied, make sure
>> we retry using straight NFS.
>>
>> Note that some drivers may prefer to have better control over whether
>> a retry goes to mds or data server...will a policy op be needed here?
>
> Yes, we do. We'll get there later.
>
>>
>> Signed-off-by: Fred Isaman <iisaman at citi.umich.edu>
>> Signed-off-by: Benny Halevy <bhalevy at panasas.com>
>> ---
>> fs/nfs/write.c | 3 +++
>> include/linux/nfs_page.h | 3 +++
>> 2 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/nfs/write.c b/fs/nfs/write.c
>> index 5616f48..2779fcb 100644
>> --- a/fs/nfs/write.c
>> +++ b/fs/nfs/write.c
>> @@ -881,6 +881,9 @@ static int nfs_write_rpcsetup(struct nfs_page *req,
>> */
>> static void nfs_redirty_request(struct nfs_page *req)
>> {
>> +#ifdef CONFIG_PNFS
>> + clear_bit(PG_USE_PNFS, &req->wb_flags);
>> +#endif
>
> How about defining a pnfs_redirty_request() static inline function
> to do this when CONFIG_PNFS is defined and nothing otherwise?
> This seem like the right place to put more logic there later,
> like calling an optional LD policy method.
>
OK
>> nfs_mark_request_dirty(req);
>> nfs_end_page_writeback(req->wb_page);
>> nfs_clear_page_tag_locked(req);
>> diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
>> index fa769ef..a3adb35 100644
>> --- a/include/linux/nfs_page.h
>> +++ b/include/linux/nfs_page.h
>> @@ -30,6 +30,9 @@
>> #define PG_BUSY 0
>> #define PG_NEED_COMMIT 1
>> #define PG_NEED_RESCHED 2
>> +#ifdef CONFIG_PNFS
>> +#define PG_USE_PNFS 3
>> +#endif
>
> Let's define the constant unconditionally. This can simplify using
> it in the !defined(CONFIG_PNFS) case without having to use ifdefs all over
> the place and it costs nothing.
>
OK
Fred
>>
>> struct nfs_inode;
>> struct nfs_page {
>
>
More information about the pNFS
mailing list