linux-next: manual merge of the ceph tree with Linus' tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sage,

Today's linux-next merge of the ceph tree got a conflict in
fs/ceph/xattr.c between commit 83eb26af0db7 ("ceph: ensure prealloc_blob
is in place when removing xattr") from Linus' tree and commit
15226d16c19c ("ceph: make ceph_setxattr() and ceph_removexattr() more
alike") from the ceph tree.

I used the resolution provided by Alex (thanks) (see below) and I can
carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

diff --cc fs/ceph/xattr.c
index a76f697,a3c1f9b..0000000
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@@ -816,11 -883,10 +883,11 @@@ static int ceph_send_removexattr(struc
  int ceph_removexattr(struct dentry *dentry, const char *name)
  {
  	struct inode *inode = dentry->d_inode;
+ 	struct ceph_vxattr *vxattr;
  	struct ceph_inode_info *ci = ceph_inode(inode);
- 	struct ceph_vxattr_cb *vxattrs = ceph_inode_vxattrs(inode);
  	int issued;
  	int err;
 +	int required_blob_size;
  	int dirty;
  
  	if (ceph_snap(inode) != CEPH_NOSNAP)
@@@ -829,42 -895,19 +896,39 @@@
  	if (!ceph_is_valid_xattr(name))
  		return -EOPNOTSUPP;
  
- 	if (vxattrs) {
- 		struct ceph_vxattr_cb *vxattr =
- 			ceph_match_vxattr(vxattrs, name);
- 		if (vxattr && vxattr->readonly)
- 			return -EOPNOTSUPP;
- 	}
+ 	vxattr = ceph_match_vxattr(inode, name);
+ 	if (vxattr && vxattr->readonly)
+ 		return -EOPNOTSUPP;
  
 +	err = -ENOMEM;
  	spin_lock(&ci->i_ceph_lock);
- 	__build_xattrs(inode);
 +retry:
  	issued = __ceph_caps_issued(ci, NULL);
  	dout("removexattr %p issued %s\n", inode, ceph_cap_string(issued));
- 
  	if (!(issued & CEPH_CAP_XATTR_EXCL))
  		goto do_sync;
+ 	__build_xattrs(inode);
  
 +	required_blob_size = __get_required_blob_size(ci, 0, 0);
 +
 +	if (!ci->i_xattrs.prealloc_blob ||
 +	    required_blob_size > ci->i_xattrs.prealloc_blob->alloc_len) {
 +		struct ceph_buffer *blob;
 +
 +		spin_unlock(&ci->i_ceph_lock);
 +		dout(" preaallocating new blob size=%d\n", required_blob_size);
 +		blob = ceph_buffer_new(required_blob_size, GFP_NOFS);
 +		if (!blob)
 +			goto out;
 +		spin_lock(&ci->i_ceph_lock);
 +		if (ci->i_xattrs.prealloc_blob)
 +			ceph_buffer_put(ci->i_xattrs.prealloc_blob);
 +		ci->i_xattrs.prealloc_blob = blob;
 +		goto retry;
 +	}
 +
  	err = __remove_xattr_by_name(ceph_inode(inode), name);
+ 
  	dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_XATTR_EXCL);
  	ci->i_xattrs.dirty = true;
  	inode->i_ctime = CURRENT_TIME;

Attachment: pgpRgsUDZi88T.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux