Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
debian-packages
lustre-release
Commits
1c90533c
Commit
1c90533c
authored
20 years ago
by
Wang Di
Browse files
Options
Downloads
Patches
Plain Diff
add lock in inserting extents to EA
parent
938625c2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lustre/kernel_patches/patches/ext3-extents-in-ea-2.4.20.patch
+31
-14
31 additions, 14 deletions
...re/kernel_patches/patches/ext3-extents-in-ea-2.4.20.patch
with
31 additions
and
14 deletions
lustre/kernel_patches/patches/ext3-extents-in-ea-2.4.20.patch
+
31
−
14
View file @
1c90533c
Index: linux-2.4.2
0
/fs/ext3/extents-in-ea.c
Index: linux-2.4.2
4
/fs/ext3/extents-in-ea.c
===================================================================
--- linux-2.4.2
0
.orig/fs/ext3/extents-in-ea.c 200
4
-0
5-06 23:03
:3
9
.000000000
-07
00
+++ linux-2.4.2
0
/fs/ext3/extents-in-ea.c 2004-0
5-06 23:03:39
.000000000
-07
00
@@ -0,0 +1,2
02
@@
--- linux-2.4.2
4
.orig/fs/ext3/extents-in-ea.c 200
3
-0
1-30 18:24
:3
7
.000000000
+08
00
+++ linux-2.4.2
4
/fs/ext3/extents-in-ea.c 2004-0
6-24 21:53:00
.000000000
+08
00
@@ -0,0 +1,2
19
@@
+/*
+ * Copyright (C) 2003 Alex Tomas <alex@clusterfs.com>
+ *
...
...
@@ -121,16 +121,31 @@ Index: linux-2.4.20/fs/ext3/extents-in-ea.c
+ struct ext3_ext_path *path,
+ struct ext3_extent *newex, int exist)
+{
+ struct inode *inode = tree->inode;
+ handle_t *handle;
+ int needed, err;
+ unsigned long tgen;
+
+ if (exist)
+ return EXT_CONTINUE;
+
+ tgen = EXT_GENERATION(tree);
+ needed = ext3_ext_calc_credits_for_insert(tree, path);
+ up_write(&EXT3_I(inode)->truncate_sem);
+ handle = ext3_journal_start(tree->inode, needed + 10);
+ if (IS_ERR(handle))
+ if (IS_ERR(handle)) {
+ down_write(&EXT3_I(inode)->truncate_sem);
+ return PTR_ERR(handle);
+ }
+
+ if (tgen != EXT_GENERATION(tree)) {
+ /* the tree has changed. so path can be invalid at moment */
+ ext3_journal_stop(handle, inode);
+ down_write(&EXT3_I(inode)->truncate_sem);
+ return EXT_REPEAT;
+ }
+
+ down_write(&EXT3_I(inode)->truncate_sem);
+
+ /* insert new extent */
+ newex->e_start = 0;
...
...
@@ -150,9 +165,11 @@ Index: linux-2.4.20/fs/ext3/extents-in-ea.c
+
+ err = ext3_init_tree_in_ea_desc(&tree, inode, name_index, eaname);
+ if (err == 0) {
+ down_write(&EXT3_I(inode)->truncate_sem);
+ err = ext3_ext_walk_space(&tree, from, num,
+ ext3_ext_in_ea_new_extent);
+ ext3_release_tree_in_ea_desc(&tree);
+ up_write(&EXT3_I(inode)->truncate_sem);
+ }
+ return err;
+}
...
...
@@ -205,10 +222,10 @@ Index: linux-2.4.20/fs/ext3/extents-in-ea.c
+ return err;
+}
+
Index: linux-2.4.2
0
/fs/ext3/Makefile
Index: linux-2.4.2
4
/fs/ext3/Makefile
===================================================================
--- linux-2.4.2
0
.orig/fs/ext3/Makefile 2004-0
5
-0
6 23:02:11
.000000000
-07
00
+++ linux-2.4.2
0
/fs/ext3/Makefile 2004-0
5-06 23:03:3
9.000000000
-07
00
--- linux-2.4.2
4
.orig/fs/ext3/Makefile 2004-0
6
-0
9 11:31:06
.000000000
+08
00
+++ linux-2.4.2
4
/fs/ext3/Makefile 2004-0
6-24 21:36:2
9.000000000
+08
00
@@ -19,7 +19,7 @@
obj-m := $(O_TARGET)
...
...
@@ -218,10 +235,10 @@ Index: linux-2.4.20/fs/ext3/Makefile
obj-$(CONFIG_EXT3_FS_XATTR_USER) += xattr_user.o
include $(TOPDIR)/Rules.make
Index: linux-2.4.2
0
/fs/ext3/xattr.c
Index: linux-2.4.2
4
/fs/ext3/xattr.c
===================================================================
--- linux-2.4.2
0
.orig/fs/ext3/xattr.c 2004-0
5
-0
6 23:02:11
.000000000
-07
00
+++ linux-2.4.2
0
/fs/ext3/xattr.c 2004-0
5-06 23:05
:2
0
.000000000
-07
00
--- linux-2.4.2
4
.orig/fs/ext3/xattr.c 2004-0
6
-0
9 11:31:06
.000000000
+08
00
+++ linux-2.4.2
4
/fs/ext3/xattr.c 2004-0
6-24 21:36
:2
9
.000000000
+08
00
@@ -771,7 +771,8 @@
*/
int
...
...
@@ -329,10 +346,10 @@ Index: linux-2.4.20/fs/ext3/xattr.c
/*
* ext3_xattr_block_set()
*
Index: linux-2.4.2
0
/include/linux/ext3_xattr.h
Index: linux-2.4.2
4
/include/linux/ext3_xattr.h
===================================================================
--- linux-2.4.2
0
.orig/include/linux/ext3_xattr.h 2004-0
5
-0
6 23:02:11
.000000000
-07
00
+++ linux-2.4.2
0
/include/linux/ext3_xattr.h 2004-0
5-06 23:03:3
9.000000000
-07
00
--- linux-2.4.2
4
.orig/include/linux/ext3_xattr.h 2004-0
6
-0
9 11:31:06
.000000000
+08
00
+++ linux-2.4.2
4
/include/linux/ext3_xattr.h 2004-0
6-24 21:36:2
9.000000000
+08
00
@@ -80,6 +80,7 @@
extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t);
extern int ext3_xattr_list(struct inode *, char *, size_t);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment