linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iomap: Fix unsharing of an extent >2GB on a 32-bit machine
@ 2020-06-07 10:35 Matthew Wilcox
  2020-06-08  6:20 ` Christoph Hellwig
  2020-06-08 16:16 ` Darrick J. Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Matthew Wilcox @ 2020-06-07 10:35 UTC (permalink / raw)
  To: Christoph Hellwig, Darrick J . Wong, linux-xfs, linux-fsdevel
  Cc: Matthew Wilcox (Oracle)

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

Widen the type used for counting the number of bytes unshared.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/iomap/buffered-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index ae6c5e38f0e8..9f90d2394535 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -909,7 +909,7 @@ iomap_unshare_actor(struct inode *inode, loff_t pos, loff_t length, void *data,
 		struct iomap *iomap, struct iomap *srcmap)
 {
 	long status = 0;
-	ssize_t written = 0;
+	loff_t written = 0;
 
 	/* don't bother with blocks that are not shared to start with */
 	if (!(iomap->flags & IOMAP_F_SHARED))
-- 
2.26.2


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

* Re: [PATCH] iomap: Fix unsharing of an extent >2GB on a 32-bit machine
  2020-06-07 10:35 [PATCH] iomap: Fix unsharing of an extent >2GB on a 32-bit machine Matthew Wilcox
@ 2020-06-08  6:20 ` Christoph Hellwig
  2020-06-08 16:16 ` Darrick J. Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2020-06-08  6:20 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Christoph Hellwig, Darrick J . Wong, linux-xfs, linux-fsdevel

On Sun, Jun 07, 2020 at 03:35:36AM -0700, Matthew Wilcox wrote:
> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> 
> Widen the type used for counting the number of bytes unshared.

Looks good, although at least for XFS we can't have that large
extents anyway:

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

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

* Re: [PATCH] iomap: Fix unsharing of an extent >2GB on a 32-bit machine
  2020-06-07 10:35 [PATCH] iomap: Fix unsharing of an extent >2GB on a 32-bit machine Matthew Wilcox
  2020-06-08  6:20 ` Christoph Hellwig
@ 2020-06-08 16:16 ` Darrick J. Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2020-06-08 16:16 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Christoph Hellwig, linux-xfs, linux-fsdevel

On Sun, Jun 07, 2020 at 03:35:36AM -0700, Matthew Wilcox wrote:
> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> 
> Widen the type used for counting the number of bytes unshared.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Makes sense,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/iomap/buffered-io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index ae6c5e38f0e8..9f90d2394535 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -909,7 +909,7 @@ iomap_unshare_actor(struct inode *inode, loff_t pos, loff_t length, void *data,
>  		struct iomap *iomap, struct iomap *srcmap)
>  {
>  	long status = 0;
> -	ssize_t written = 0;
> +	loff_t written = 0;
>  
>  	/* don't bother with blocks that are not shared to start with */
>  	if (!(iomap->flags & IOMAP_F_SHARED))
> -- 
> 2.26.2
> 

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

end of thread, other threads:[~2020-06-08 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-07 10:35 [PATCH] iomap: Fix unsharing of an extent >2GB on a 32-bit machine Matthew Wilcox
2020-06-08  6:20 ` Christoph Hellwig
2020-06-08 16:16 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).