linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the vfs tree with the btrfs tree
@ 2015-04-13  1:37 Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2015-04-13  1:37 UTC (permalink / raw)
  To: Al Viro, Chris Mason, Josef Bacik
  Cc: linux-next, linux-kernel, David Sterba, David Howells

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

Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/btrfs/xattr.c between commit 3c3b04d10ff1 ("btrfs: don't accept bare
namespace as a valid xattr") from the btrfs tree and commit
5dd3dc06371a ("VFS: normal filesystems (and lustre): d_inode()
annotations") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc fs/btrfs/xattr.c
index 45ea704be030,4cca14ecb660..000000000000
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@@ -408,17 -388,15 +408,17 @@@ ssize_t btrfs_getxattr(struct dentry *d
  	if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN))
  		return generic_getxattr(dentry, name, buffer, size);
  
 -	if (!btrfs_is_valid_xattr(name))
 -		return -EOPNOTSUPP;
 +	ret = btrfs_is_valid_xattr(name);
 +	if (ret)
 +		return ret;
- 	return __btrfs_getxattr(dentry->d_inode, name, buffer, size);
+ 	return __btrfs_getxattr(d_inode(dentry), name, buffer, size);
  }
  
  int btrfs_setxattr(struct dentry *dentry, const char *name, const void *value,
  		   size_t size, int flags)
  {
- 	struct btrfs_root *root = BTRFS_I(dentry->d_inode)->root;
+ 	struct btrfs_root *root = BTRFS_I(d_inode(dentry))->root;
 +	int ret;
  
  	/*
  	 * The permission on security.* and system.* is not checked
@@@ -435,12 -413,11 +435,12 @@@
  	if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN))
  		return generic_setxattr(dentry, name, value, size, flags);
  
 -	if (!btrfs_is_valid_xattr(name))
 -		return -EOPNOTSUPP;
 +	ret = btrfs_is_valid_xattr(name);
 +	if (ret)
 +		return ret;
  
  	if (!strncmp(name, XATTR_BTRFS_PREFIX, XATTR_BTRFS_PREFIX_LEN))
- 		return btrfs_set_prop(dentry->d_inode, name,
+ 		return btrfs_set_prop(d_inode(dentry), name,
  				      value, size, flags);
  
  	if (size == 0)
@@@ -452,8 -429,7 +452,8 @@@
  
  int btrfs_removexattr(struct dentry *dentry, const char *name)
  {
- 	struct btrfs_root *root = BTRFS_I(dentry->d_inode)->root;
+ 	struct btrfs_root *root = BTRFS_I(d_inode(dentry))->root;
 +	int ret;
  
  	/*
  	 * The permission on security.* and system.* is not checked
@@@ -470,15 -446,14 +470,15 @@@
  	if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN))
  		return generic_removexattr(dentry, name);
  
 -	if (!btrfs_is_valid_xattr(name))
 -		return -EOPNOTSUPP;
 +	ret = btrfs_is_valid_xattr(name);
 +	if (ret)
 +		return ret;
  
  	if (!strncmp(name, XATTR_BTRFS_PREFIX, XATTR_BTRFS_PREFIX_LEN))
- 		return btrfs_set_prop(dentry->d_inode, name,
+ 		return btrfs_set_prop(d_inode(dentry), name,
  				      NULL, 0, XATTR_REPLACE);
  
- 	return __btrfs_setxattr(NULL, dentry->d_inode, name, NULL, 0,
+ 	return __btrfs_setxattr(NULL, d_inode(dentry), name, NULL, 0,
  				XATTR_REPLACE);
  }
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread
* linux-next: manual merge of the vfs tree with the btrfs tree
@ 2021-04-12  1:59 Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2021-04-12  1:59 UTC (permalink / raw)
  To: Al Viro, David Sterba
  Cc: David Sterba, Josef Bacik, Linux Kernel Mailing List,
	Linux Next Mailing List, Miklos Szeredi

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

Hi all,

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

  fs/btrfs/ioctl.c

between commit:

  2911da32d543 ("btrfs: use btrfs_inode_lock/btrfs_inode_unlock inode lock helpers")

from the btrfs tree and commit:

  d9b32b140987 ("btrfs: convert to fileattr")

from the vfs tree.

I fixed it up (I used the vfs tree version (which removed inode_lock()
in various places) 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.

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 3+ messages in thread
* linux-next: manual merge of the vfs tree with the btrfs tree
@ 2022-07-11  0:34 Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2022-07-11  0:34 UTC (permalink / raw)
  To: Al Viro, David Sterba
  Cc: David Sterba, Filipe Manana, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

  fs/btrfs/file.c

between commit:

  c8223467948b ("btrfs: don't fallback to buffered IO for NOWAIT direct IO writes")

from the btrfs tree and commit:

  eacdf4eaca63 ("btrfs: use IOMAP_DIO_NOSYNC")

from the vfs 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.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/btrfs/file.c
index 1876072dee9d,30e6aef9739f..000000000000
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@@ -1846,36 -1846,8 +1846,35 @@@ static ssize_t check_direct_IO(struct b
  	return 0;
  }
  
 +static size_t dio_fault_in_size(const struct kiocb *iocb,
 +				const struct iov_iter *iov,
 +				size_t prev_left)
 +{
 +	const size_t left = iov_iter_count(iov);
 +	size_t size = PAGE_SIZE;
 +
 +	/*
 +	 * If there's no progress since the last time we had to fault in pages,
 +	 * then we fault in at most 1 page. Faulting in more than that may
 +	 * result in making very slow progress or falling back to buffered IO,
 +	 * because by the time we retry the DIO operation some of the first
 +	 * remaining pages may have been evicted in order to fault in other pages
 +	 * that follow them. That can happen when we are under memory pressure and
 +	 * the iov represents a large buffer.
 +	 */
 +	if (left != prev_left) {
 +		int dirty_tresh = current->nr_dirtied_pause - current->nr_dirtied;
 +
 +		size = max(dirty_tresh, 8) << PAGE_SHIFT;
 +		size = min_t(size_t, SZ_1M, size);
 +	}
 +	size -= offset_in_page(iocb->ki_pos);
 +
 +	return min(left, size);
 +}
 +
  static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from)
  {
- 	const bool is_sync_write = (iocb->ki_flags & IOCB_DSYNC);
  	struct file *file = iocb->ki_filp;
  	struct inode *inode = file_inode(file);
  	struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
@@@ -1993,17 -1954,7 +1983,10 @@@ again
  
  	btrfs_inode_unlock(inode, ilock_flags);
  
- 	/*
- 	 * Add back IOCB_DSYNC. Our caller, btrfs_file_write_iter(), will do
- 	 * the fsync (call generic_write_sync()).
- 	 */
- 	if (is_sync_write)
- 		iocb->ki_flags |= IOCB_DSYNC;
- 
 -	/* If 'err' is -ENOTBLK then it means we must fallback to buffered IO. */
 +	/*
 +	 * If 'err' is -ENOTBLK or we have not written all data, then it means
 +	 * we must fallback to buffered IO.
 +	 */
  	if ((err < 0 && err != -ENOTBLK) || !iov_iter_count(from))
  		goto out;
  

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

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

end of thread, other threads:[~2022-07-11  0:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13  1:37 linux-next: manual merge of the vfs tree with the btrfs tree Stephen Rothwell
2021-04-12  1:59 Stephen Rothwell
2022-07-11  0:34 Stephen Rothwell

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).