All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RESEND] pnfs/blocklayout: fix last_write_offset incorrectly set to page boundary
@ 2016-10-11 19:53 Benjamin Coddington
  2016-10-11 20:17 ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Coddington @ 2016-10-11 19:53 UTC (permalink / raw)
  To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs

I'm resending this as the original was buried in a thread and I want to make
sure it gets picked up.  This fixes a bug that went in v4.8.

8<--------------------------------------------------------------------------

Commit 41963c10c47a35185e68cb9049f7a3493c94d2d7 sets the block layout's
last written byte to the offset of the end of the extent rather than the
end of the write which incorrectly updates the inode's size for
partial-page writes.

Fixes: 41963c10c47a ("pnfs/blocklayout: update last_write_offset atomically with extents")
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
---
 fs/nfs/blocklayout/blocklayout.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 217847679f0e..2905479f214a 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -344,9 +344,10 @@ static void bl_write_cleanup(struct work_struct *work)
 		u64 start = hdr->args.offset & (loff_t)PAGE_MASK;
 		u64 end = (hdr->args.offset + hdr->args.count +
 			PAGE_SIZE - 1) & (loff_t)PAGE_MASK;
+		u64 lwb = hdr->args.offset + hdr->args.count;
 
 		ext_tree_mark_written(bl, start >> SECTOR_SHIFT,
-					(end - start) >> SECTOR_SHIFT, end);
+					(end - start) >> SECTOR_SHIFT, lwb);
 	}
 
 	pnfs_ld_write_done(hdr);
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH][RESEND] pnfs/blocklayout: fix last_write_offset incorrectly set to page boundary
  2016-10-11 19:53 [PATCH][RESEND] pnfs/blocklayout: fix last_write_offset incorrectly set to page boundary Benjamin Coddington
@ 2016-10-11 20:17 ` Christoph Hellwig
  2016-10-13 20:46   ` Anna Schumaker
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2016-10-11 20:17 UTC (permalink / raw)
  To: Benjamin Coddington; +Cc: Trond Myklebust, Anna Schumaker, linux-nfs

On Tue, Oct 11, 2016 at 03:53:21PM -0400, Benjamin Coddington wrote:
> I'm resending this as the original was buried in a thread and I want to make
> sure it gets picked up.  This fixes a bug that went in v4.8.

Didn't I already give you my review for this?  Otherwise:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Christoph Hellwig <hch@lst.de>

should also get a Cc to stable.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][RESEND] pnfs/blocklayout: fix last_write_offset incorrectly set to page boundary
  2016-10-11 20:17 ` Christoph Hellwig
@ 2016-10-13 20:46   ` Anna Schumaker
  2016-10-21 12:18     ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Anna Schumaker @ 2016-10-13 20:46 UTC (permalink / raw)
  To: Christoph Hellwig, Benjamin Coddington; +Cc: Trond Myklebust, linux-nfs

Hi Ben,

Thanks for the patch!  It didn't make it into my initial pull request for 4.9, but I am planning on sending it for an rc along with any bakeathon changes from next week.

I hope that's okay!
Anna

On 10/11/2016 04:17 PM, Christoph Hellwig wrote:
> On Tue, Oct 11, 2016 at 03:53:21PM -0400, Benjamin Coddington wrote:
>> I'm resending this as the original was buried in a thread and I want to make
>> sure it gets picked up.  This fixes a bug that went in v4.8.
> 
> Didn't I already give you my review for this?  Otherwise:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Tested-by: Christoph Hellwig <hch@lst.de>
> 
> should also get a Cc to stable.
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][RESEND] pnfs/blocklayout: fix last_write_offset incorrectly set to page boundary
  2016-10-13 20:46   ` Anna Schumaker
@ 2016-10-21 12:18     ` Christoph Hellwig
  2016-10-21 14:58       ` Anna Schumaker
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2016-10-21 12:18 UTC (permalink / raw)
  To: Anna Schumaker
  Cc: Christoph Hellwig, Benjamin Coddington, Trond Myklebust, linux-nfs

On Thu, Oct 13, 2016 at 04:46:19PM -0400, Anna Schumaker wrote:
> Hi Ben,
> 
> Thanks for the patch!  It didn't make it into my initial pull request for 4.9, but I am planning on sending it for an rc along with any bakeathon changes from next week.

Any progress on that?  I'd really like to get the fix in before at least
-rc2.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][RESEND] pnfs/blocklayout: fix last_write_offset incorrectly set to page boundary
  2016-10-21 12:18     ` Christoph Hellwig
@ 2016-10-21 14:58       ` Anna Schumaker
  0 siblings, 0 replies; 5+ messages in thread
From: Anna Schumaker @ 2016-10-21 14:58 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Benjamin Coddington, Trond Myklebust, linux-nfs

Hi Christoph,

On 10/21/2016 08:18 AM, Christoph Hellwig wrote:
> On Thu, Oct 13, 2016 at 04:46:19PM -0400, Anna Schumaker wrote:
>> Hi Ben,
>>
>> Thanks for the patch!  It didn't make it into my initial pull request for 4.9, but I am planning on sending it for an rc along with any bakeathon changes from next week.
> 
> Any progress on that?  I'd really like to get the fix in before at least
> -rc2.
> 

I have the patch is my tree ready to go!  I've been holding back since the NFS Bakeathon is this week, and I was waiting to see if any bugfixes were posted that I could send off at the same time.

Anna

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-21 14:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11 19:53 [PATCH][RESEND] pnfs/blocklayout: fix last_write_offset incorrectly set to page boundary Benjamin Coddington
2016-10-11 20:17 ` Christoph Hellwig
2016-10-13 20:46   ` Anna Schumaker
2016-10-21 12:18     ` Christoph Hellwig
2016-10-21 14:58       ` Anna Schumaker

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.