mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-next: manual merge of the vfs-brauner tree with the ntfs tree
@ 2026-10-13 13:27 Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-10-13 13:27 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Joanne Koong, Linux Kernel Mailing List, Linux Next Mailing List,
	Namjae Jeon

[-- Attachment #1: Type: text/plain, Size: 2237 bytes --]

Hi all,

Today's linux-next merge of the vfs-brauner tree got a conflict in:

  fs/ntfs/inode.c

between commit:

  1e03db31119eb ("ntfs: clear stale pagecache on initialized-size extension")

from the ntfs tree and commit:

  d874f8060847c ("iomap: pass iomap_iter_next_fn directly instead of struct iomap_ops")

from the vfs-brauner tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc fs/ntfs/inode.c
index 206db4e99ef13,cceb42b267051..0000000000000
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@@ -2576,33 -2437,23 +2576,33 @@@ int ntfs_extend_initialized_size(struc
  
  	err = ntfs_attr_map_whole_runlist(ni);
  	if (err)
 -		return err;
 +		goto out;
  
 -	if (!NInoCompressed(ni) && old_init_size < offset) {
 -		err = iomap_zero_range(vi, old_init_size,
 -				       offset - old_init_size,
 -				       NULL, ntfs_seek_iomap_next,
 -				       &ntfs_iomap_folio_ops, NULL);
 -		if (err)
 -			return err;
 +	if (!NInoCompressed(ni)) {
 +		/*
 +		 * Zeroing skips holes, so discard cached uninitialized bytes
 +		 * before making them visible to writes or shared mappings.
 +		 */
 +		clear_size = max_t(loff_t, i_size_read(vi), new_size);
 +		truncate_pagecache_range(vi, old_init_size, clear_size - 1);
 +
 +		if (old_init_size < offset) {
 +			err = iomap_zero_range(vi, old_init_size,
 +					       offset - old_init_size,
- 					       NULL, &ntfs_seek_iomap_ops,
++					       NULL, ntfs_seek_iomap_next,
 +					       &ntfs_iomap_folio_ops, NULL);
 +			if (err)
 +				goto out;
 +		}
  	}
  
 -
 -	mutex_lock(&ni->mrec_lock);
 +	mutex_lock(&mrec_ni->mrec_lock);
  	err = ntfs_attr_set_initialized_size(ni, new_size);
 -	mutex_unlock(&ni->mrec_lock);
 +	mutex_unlock(&mrec_ni->mrec_lock);
  	if (err)
  		truncate_setsize(vi, old_init_size);
 +out:
 +	filemap_invalidate_unlock(vi->i_mapping);
  	return err;
  }
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: manual merge of the vfs-brauner tree with the ntfs tree
  2026-08-05 12:34 Mark Brown
@ 2026-08-05 16:13 ` Joanne Koong
  0 siblings, 0 replies; 3+ messages in thread
From: Joanne Koong @ 2026-08-05 16:13 UTC (permalink / raw)
  To: Mark Brown
  Cc: Christian Brauner, Hyeontae Lee, Linux Kernel Mailing List,
	Linux Next Mailing List, Namjae Jeon

On Wed, Aug 5, 2026 at 5:34 AM Mark Brown <broonie@kernel.org> wrote:
>
> Hi all,
>
> Today's linux-next merge of the vfs-brauner tree got a conflict in:
>
>   fs/ntfs/iomap.c
>
> between commit:
>
>   9cf6ac617e8e9 ("ntfs: serialize resident iomap reads with mrec_lock")
>
> from the ntfs tree and commit:
>
>   7a7bf7551624f ("ntfs: convert iomap ops to ->iomap_next()")
>
> from the vfs-brauner tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> diff --cc fs/ntfs/iomap.c
> index 73c50171285aa,d0964ac840d9f..0000000000000
> --- a/fs/ntfs/iomap.c
> +++ b/fs/ntfs/iomap.c
> @@@ -283,22 -274,13 +283,24 @@@ static int ntfs_read_iomap_begin(struc
>                 unsigned int flags, struct iomap *iomap, struct iomap *srcmap)
>   {
>         return __ntfs_read_iomap_begin(inode, offset, length, flags, iomap,
>  -                      srcmap, true);
>  +                      srcmap, true, true);
>   }
>
>  -static DEFINE_IOMAP_ITER_NEXT(ntfs_read_iomap_next, ntfs_read_iomap_begin);
>  +static int ntfs_read_iomap_end(struct inode *inode, loff_t pos, loff_t length,
>  +              ssize_t written, unsigned int flags, struct iomap *iomap)
>  +{
>  +      struct ntfs_inode *base_ni = iomap->private;
>  +
>  +      if (base_ni)
>  +              mutex_unlock(&base_ni->mrec_lock);
>  +      return written;
>  +}
>  +
> ++static DEFINE_IOMAP_ITER_NEXT_END(ntfs_read_iomap_next, ntfs_read_iomap_begin,
> ++                                ntfs_read_iomap_end);
> +
>   const struct iomap_ops ntfs_read_iomap_ops = {
> -       .iomap_begin = ntfs_read_iomap_begin,
> -       .iomap_end = ntfs_read_iomap_end,
> +       .iomap_next = ntfs_read_iomap_next,
>   };
>
>   /*

Hi Mark,

This looks correct to me. Thanks for resolving the merge conflict.

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

* linux-next: manual merge of the vfs-brauner tree with the ntfs tree
@ 2026-08-05 12:34 Mark Brown
  2026-08-05 16:13 ` Joanne Koong
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2026-08-05 12:34 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Hyeontae Lee, Joanne Koong, Linux Kernel Mailing List,
	Linux Next Mailing List, Namjae Jeon

[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]

Hi all,

Today's linux-next merge of the vfs-brauner tree got a conflict in:

  fs/ntfs/iomap.c

between commit:

  9cf6ac617e8e9 ("ntfs: serialize resident iomap reads with mrec_lock")

from the ntfs tree and commit:

  7a7bf7551624f ("ntfs: convert iomap ops to ->iomap_next()")

from the vfs-brauner tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc fs/ntfs/iomap.c
index 73c50171285aa,d0964ac840d9f..0000000000000
--- a/fs/ntfs/iomap.c
+++ b/fs/ntfs/iomap.c
@@@ -283,22 -274,13 +283,24 @@@ static int ntfs_read_iomap_begin(struc
  		unsigned int flags, struct iomap *iomap, struct iomap *srcmap)
  {
  	return __ntfs_read_iomap_begin(inode, offset, length, flags, iomap,
 -			srcmap, true);
 +			srcmap, true, true);
  }
  
 -static DEFINE_IOMAP_ITER_NEXT(ntfs_read_iomap_next, ntfs_read_iomap_begin);
 +static int ntfs_read_iomap_end(struct inode *inode, loff_t pos, loff_t length,
 +		ssize_t written, unsigned int flags, struct iomap *iomap)
 +{
 +	struct ntfs_inode *base_ni = iomap->private;
 +
 +	if (base_ni)
 +		mutex_unlock(&base_ni->mrec_lock);
 +	return written;
 +}
 +
++static DEFINE_IOMAP_ITER_NEXT_END(ntfs_read_iomap_next, ntfs_read_iomap_begin,
++				  ntfs_read_iomap_end);
+ 
  const struct iomap_ops ntfs_read_iomap_ops = {
- 	.iomap_begin = ntfs_read_iomap_begin,
- 	.iomap_end = ntfs_read_iomap_end,
+ 	.iomap_next = ntfs_read_iomap_next,
  };
  
  /*

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2026-10-13 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-13 13:27 linux-next: manual merge of the vfs-brauner tree with the ntfs tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2026-08-05 12:34 Mark Brown
2026-08-05 16:13 ` Joanne Koong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®