Skip to contentSkip to conversation

ocfs2: Always update xattr search when creating bucket.

PATCH New Tao Ma 2 participants 3 messages Dec 5, 2008 – Dec 17, 2008 OCFS2

lore
Share & tools
lore

Tao Ma

author
#0 lore raw

PATCH 1/1 ocfs2: Always update xattr search when creating bucket.

When we create xattr bucket during the process of xattr set, we always need to update the ocfs2_xattr_search since even if the bucket size is the same as block size, the offset will change because of the removal of the ocfs2_xattr_block header.

---
 fs/ocfs2/xattr.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/ocfs2/xattr.c +2 -2
index 054e2ef..74d7367 100644
@@ -2645,9 +2645,9 @@ static int ocfs2_xattr_update_xattr_search(struct inode *inode,
 				return ret;
 			}
 
-			i = xs->here - old_xh->xh_entries;
-			xs->here = &xs->header->xh_entries[i];
 		}
+		i = xs->here - old_xh->xh_entries;
+		xs->here = &xs->header->xh_entries[i];
 	}
 
 	return ret;
Signature · 1 line
1.5.4.GIT
#1 lore raw

PATCH 1/1 ocfs2: Always update xattr search when creating bucket.

Quoted 4 lines · Tao Ma

When we create xattr bucket during the process of xattr set, we always need to update the ocfs2_xattr_search since even if the bucket size is the same as block size, the offset will change because of the removal of the ocfs2_xattr_block header.

Ok, this is in the fixes branch now. I will send it upstream tommorrow. By the way - am I correct in that merge_window seems to have fixed this already?

	--Mark

--
Mark Fasheh

author
#2 lore raw

PATCH 1/1 ocfs2: Always update xattr search when creating bucket.

Quoted 9 lines · Mark Fasheh
Quoted 4 lines · Tao Ma

When we create xattr bucket during the process of xattr set, we always need to update the ocfs2_xattr_search since even if the bucket size is the same as block size, the offset will change because of the removal of the ocfs2_xattr_block header.

Ok, this is in the fixes branch now. I will send it upstream tommorrow. By the way - am I correct in that merge_window seems to have fixed this already?

no, and AFAICS, there is a minor merge conflict with the merge window because of Joel's refactoring of xattr buckets, but it can be easily resolved. ;)

Regards,
Tao