Re: [PATCH 30/40] pnfs-submit: wave3 let LAYOUTGET distinguish between read and write calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 4, 2011 at 4:59 PM, Fred Isaman <iisaman@xxxxxxxxxx> wrote:
> On Fri, Feb 4, 2011 at 4:33 PM,  <andros@xxxxxxxxxx> wrote:
>> From: Fred Isaman <iisaman@xxxxxxxxxx>
>>
>> This is done by introducing pgio->pg_iswrite.
>>
>> For wave3 do not send layoutget on write
>> pnfs-submit wave 3 remove pg_iswrite add back for wave4
>> Remove CONFIG_NFS_V4_1 from struct nfs_page
>>
>
> The pg_iswrite comments are outdated.

OK

>
> Fred
>
>> Signed-off-by: Fred Isaman <iisaman@xxxxxxxxxx>
>> Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
>> ---
>>  fs/nfs/pagelist.c        |    9 ++++-----
>>  fs/nfs/write.c           |    3 +++
>>  include/linux/nfs_page.h |    2 --
>>  3 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
>> index ea3b7f8..cf09cb7 100644
>> --- a/fs/nfs/pagelist.c
>> +++ b/fs/nfs/pagelist.c
>> @@ -259,10 +259,8 @@ static int nfs_can_coalesce_requests(struct nfs_page *prev,
>>        /* For non-whole file layouts, need to check that req is inside of
>>         * pgio->pg_test.
>>         */
>> -#ifdef CONFIG_NFS_V4_1
>>        if (pgio->pg_test && !pgio->pg_test(pgio, prev, req))
>>                return 0;
>> -#endif /* CONFIG_NFS_V4_1 */
>>        return 1;
>>  }
>>
>> @@ -300,9 +298,10 @@ static int nfs_pageio_do_add_request(struct nfs_pageio_descriptor *desc,
>>        } else {
>>                put_lseg(desc->pg_lseg);
>>                desc->pg_base = req->wb_pgbase;
>> -               desc->pg_lseg = pnfs_update_layout(desc->pg_inode,
>> -                                                  req->wb_context,
>> -                                                  IOMODE_READ);
>> +               if (desc->pg_test)
>> +                       desc->pg_lseg = pnfs_update_layout(desc->pg_inode,
>> +                                                          req->wb_context,
>> +                                                          IOMODE_READ);
>>        }
>>        nfs_list_remove_request(req);
>>        nfs_list_add_request(req, &desc->pg_list);
>> diff --git a/fs/nfs/write.c b/fs/nfs/write.c
>> index 004c28b..aca0268 100644
>> --- a/fs/nfs/write.c
>> +++ b/fs/nfs/write.c
>> @@ -28,6 +28,7 @@
>>  #include "iostat.h"
>>  #include "nfs4_fs.h"
>>  #include "fscache.h"
>> +#include "pnfs.h"
>>
>>  #define NFSDBG_FACILITY                NFSDBG_PAGECACHE
>>
>> @@ -982,6 +983,8 @@ static void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio,
>>  {
>>        size_t wsize = NFS_SERVER(inode)->wsize;
>>
>> +       pgio->pg_test = NULL;
>> +
>>        if (wsize < PAGE_CACHE_SIZE)
>>                nfs_pageio_init(pgio, inode, nfs_flush_multi, wsize, ioflags);
>>        else
>> diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
>> index 488f27b..ba88ff4 100644
>> --- a/include/linux/nfs_page.h
>> +++ b/include/linux/nfs_page.h
>> @@ -63,9 +63,7 @@ struct nfs_pageio_descriptor {
>>        int                     pg_ioflags;
>>        int                     pg_error;
>>        struct pnfs_layout_segment *pg_lseg;
>> -#ifdef CONFIG_NFS_V4_1
>>        int                     (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, struct nfs_page *);
>> -#endif /* CONFIG_NFS_V4_1 */
>>  };
>>
>>  #define NFS_WBACK_BUSY(req)    (test_bit(PG_BUSY,&(req)->wb_flags))
>> --
>> 1.6.6
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux