diff options
Diffstat (limited to 'fs/nfs/objlayout/objio_osd.c')
-rw-r--r-- | fs/nfs/objlayout/objio_osd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c index ea6d111b03e9..be731e6b7b9c 100644 --- a/fs/nfs/objlayout/objio_osd.c +++ b/fs/nfs/objlayout/objio_osd.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <scsi/osd_ore.h> | 41 | #include <scsi/osd_ore.h> |
42 | 42 | ||
43 | #include "objlayout.h" | 43 | #include "objlayout.h" |
44 | #include "../internal.h" | ||
44 | 45 | ||
45 | #define NFSDBG_FACILITY NFSDBG_PNFS_LD | 46 | #define NFSDBG_FACILITY NFSDBG_PNFS_LD |
46 | 47 | ||
@@ -606,8 +607,14 @@ static bool aligned_on_raid_stripe(u64 offset, struct ore_layout *layout, | |||
606 | void objio_init_write(struct nfs_pageio_descriptor *pgio, struct nfs_page *req) | 607 | void objio_init_write(struct nfs_pageio_descriptor *pgio, struct nfs_page *req) |
607 | { | 608 | { |
608 | unsigned long stripe_end = 0; | 609 | unsigned long stripe_end = 0; |
610 | u64 wb_size; | ||
609 | 611 | ||
610 | pnfs_generic_pg_init_write(pgio, req); | 612 | if (pgio->pg_dreq == NULL) |
613 | wb_size = i_size_read(pgio->pg_inode) - req_offset(req); | ||
614 | else | ||
615 | wb_size = nfs_dreq_bytes_left(pgio->pg_dreq); | ||
616 | |||
617 | pnfs_generic_pg_init_write(pgio, req, wb_size); | ||
611 | if (unlikely(pgio->pg_lseg == NULL)) | 618 | if (unlikely(pgio->pg_lseg == NULL)) |
612 | return; /* Not pNFS */ | 619 | return; /* Not pNFS */ |
613 | 620 | ||