Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b1a4861d
Commit
b1a4861d
authored
Jul 10, 2002
by
Vladimir Saveliev
Committed by
Linus Torvalds
Jul 10, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not require for exclusive access to buffer
parent
a321a55f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
47 deletions
+17
-47
fs/reiserfs/Makefile
fs/reiserfs/Makefile
+1
-1
fs/reiserfs/do_balan.c
fs/reiserfs/do_balan.c
+2
-6
fs/reiserfs/fix_node.c
fs/reiserfs/fix_node.c
+8
-25
fs/reiserfs/ibalance.c
fs/reiserfs/ibalance.c
+3
-4
fs/reiserfs/stree.c
fs/reiserfs/stree.c
+1
-1
fs/reiserfs/super.c
fs/reiserfs/super.c
+2
-2
include/linux/reiserfs_fs.h
include/linux/reiserfs_fs.h
+0
-8
No files found.
fs/reiserfs/Makefile
View file @
b1a4861d
...
...
@@ -6,7 +6,7 @@ obj-$(CONFIG_REISERFS_FS) += reiserfs.o
reiserfs-objs
:=
bitmap.o do_balan.o namei.o inode.o file.o dir.o fix_node.o
\
super.o prints.o objectid.o lbalance.o ibalance.o stree.o
\
hashes.o
buffer2.o
tail_conversion.o journal.o resize.o
\
hashes.o tail_conversion.o journal.o resize.o
\
item_ops.o ioctl.o procfs.o
# gcc -O2 (the kernel default) is overaggressive on ppc32 when many inline
...
...
fs/reiserfs/do_balan.c
View file @
b1a4861d
...
...
@@ -1078,13 +1078,9 @@ static int balance_leaf (struct tree_balance * tb,
memcpy
(
insert_key
+
i
,
B_N_PKEY
(
S_new
[
i
],
0
),
KEY_SIZE
);
insert_ptr
[
i
]
=
S_new
[
i
];
RFALSE
(
(
atomic_read
(
&
(
S_new
[
i
]
->
b_count
))
!=
1
)
&&
(
atomic_read
(
&
(
S_new
[
i
]
->
b_count
))
!=
2
||
!
(
buffer_journaled
(
S_new
[
i
])
||
buffer_journal_dirty
(
S_new
[
i
]))),
RFALSE
(
!
buffer_journaled
(
S_new
[
i
])
||
buffer_journal_dirty
(
S_new
[
i
])
||
buffer_dirty
(
S_new
[
i
]),
"PAP-12247: S_new[%d] : (%b)
\n
"
,
i
,
S_new
[
i
]);
}
/* if the affected item was not wholly shifted then we perform all necessary operations on that part or whole of the
...
...
fs/reiserfs/fix_node.c
View file @
b1a4861d
...
...
@@ -807,32 +807,15 @@ static int get_empty_nodes(
"PAP-8135: reiserfs_new_blocknrs failed when got new blocks"
);
p_s_new_bh
=
sb_getblk
(
p_s_sb
,
*
p_n_blocknr
);
if
(
atomic_read
(
&
(
p_s_new_bh
->
b_count
))
>
1
)
{
/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
/*
reiserfs_warning ("waiting for buffer %b, iput inode pid = %d, this pid %d, mode %c, %h\n",
p_s_new_bh, put_inode_pid, current->pid, p_s_tb->tb_vn->vn_mode, p_s_tb->tb_vn->vn_ins_ih);
print_tb (0, 0, 0, p_s_tb, "tb");
*/
/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
if
(
atomic_read
(
&
(
p_s_new_bh
->
b_count
))
>
2
||
!
(
buffer_journaled
(
p_s_new_bh
)
||
buffer_journal_dirty
(
p_s_new_bh
)))
{
n_retval
=
REPEAT_SEARCH
;
free_buffers_in_tb
(
p_s_tb
);
wait_buffer_until_released
(
p_s_new_bh
);
}
}
RFALSE
(
(
atomic_read
(
&
(
p_s_new_bh
->
b_count
))
!=
1
||
buffer_dirty
(
p_s_new_bh
))
&&
(
atomic_read
(
&
(
p_s_new_bh
->
b_count
))
>
2
||
!
(
buffer_journaled
(
p_s_new_bh
)
||
buffer_journal_dirty
(
p_s_new_bh
))),
"PAP-8140: not free or dirty buffer %b for the new block"
,
RFALSE
(
buffer_dirty
(
p_s_new_bh
)
||
buffer_journaled
(
p_s_new_bh
)
||
buffer_journal_dirty
(
p_s_new_bh
),
"PAP-8140: journlaled or dirty buffer %b for the new block"
,
p_s_new_bh
);
/* Put empty buffers into the array. */
if
(
p_s_tb
->
FEB
[
p_s_tb
->
cur_blknum
])
BUG
(
);
RFALSE
(
p_s_tb
->
FEB
[
p_s_tb
->
cur_blknum
],
"PAP-8141: busy slot for new buffer"
);
mark_buffer_journal_new
(
p_s_new_bh
)
;
p_s_tb
->
FEB
[
p_s_tb
->
cur_blknum
++
]
=
p_s_new_bh
;
...
...
@@ -1926,7 +1909,7 @@ static int get_neighbors(
n_child_position
=
(
p_s_bh
==
p_s_tb
->
FL
[
n_h
]
)
?
p_s_tb
->
lkey
[
n_h
]
:
B_NR_ITEMS
(
p_s_tb
->
FL
[
n_h
]);
n_son_number
=
B_N_CHILD_NUM
(
p_s_tb
->
FL
[
n_h
],
n_child_position
);
p_s_bh
=
reiserfs
_bread
(
p_s_sb
,
n_son_number
);
p_s_bh
=
sb
_bread
(
p_s_sb
,
n_son_number
);
if
(
!
p_s_bh
)
return
IO_ERROR
;
if
(
FILESYSTEM_CHANGED_TB
(
p_s_tb
)
)
{
...
...
@@ -1959,7 +1942,7 @@ static int get_neighbors(
n_child_position
=
(
p_s_bh
==
p_s_tb
->
FR
[
n_h
]
)
?
p_s_tb
->
rkey
[
n_h
]
+
1
:
0
;
n_son_number
=
B_N_CHILD_NUM
(
p_s_tb
->
FR
[
n_h
],
n_child_position
);
p_s_bh
=
reiserfs
_bread
(
p_s_sb
,
n_son_number
);
p_s_bh
=
sb
_bread
(
p_s_sb
,
n_son_number
);
if
(
!
p_s_bh
)
return
IO_ERROR
;
if
(
FILESYSTEM_CHANGED_TB
(
p_s_tb
)
)
{
...
...
fs/reiserfs/ibalance.c
View file @
b1a4861d
...
...
@@ -1028,10 +1028,9 @@ int balance_internal (struct tree_balance * tb, /* tree_balance structure */
/* new_insert_ptr = node_pointer to S_new */
new_insert_ptr
=
S_new
;
RFALSE
((
buffer_locked
(
S_new
)
||
atomic_read
(
&
(
S_new
->
b_count
))
!=
1
)
&&
(
buffer_locked
(
S_new
)
||
atomic_read
(
&
(
S_new
->
b_count
))
>
2
||
!
(
buffer_journaled
(
S_new
)
||
buffer_journal_dirty
(
S_new
))),
"cm-00001: bad S_new (%b)"
,
S_new
);
RFALSE
(
!
buffer_journaled
(
S_new
)
||
buffer_journal_dirty
(
S_new
)
||
buffer_dirty
(
S_new
),
"cm-00001: bad S_new (%b)"
,
S_new
);
// S_new is released in unfix_nodes
}
...
...
fs/reiserfs/stree.c
View file @
b1a4861d
...
...
@@ -700,7 +700,7 @@ int search_by_key (struct super_block * p_s_sb,
/* Read the next tree node, and set the last element in the path to
have a pointer to it. */
if
(
!
(
p_s_bh
=
p_s_last_element
->
pe_buffer
=
reiserfs
_bread
(
p_s_sb
,
n_block_number
))
)
{
sb
_bread
(
p_s_sb
,
n_block_number
))
)
{
p_s_search_path
->
path_length
--
;
pathrelse
(
p_s_search_path
);
return
IO_ERROR
;
...
...
fs/reiserfs/super.c
View file @
b1a4861d
...
...
@@ -775,7 +775,7 @@ static int read_old_bitmaps (struct super_block * s)
memset
(
SB_AP_BITMAP
(
s
),
0
,
sizeof
(
struct
buffer_head
*
)
*
sb_bmap_nr
(
rs
));
for
(
i
=
0
;
i
<
sb_bmap_nr
(
rs
);
i
++
)
{
SB_AP_BITMAP
(
s
)[
i
]
=
reiserfs
_bread
(
s
,
bmp1
+
i
);
SB_AP_BITMAP
(
s
)[
i
]
=
sb
_bread
(
s
,
bmp1
+
i
);
if
(
!
SB_AP_BITMAP
(
s
)[
i
])
return
1
;
}
...
...
@@ -827,7 +827,7 @@ static int read_super_block (struct super_block * s, int offset)
sb_set_blocksize
(
s
,
sb_blocksize
(
rs
));
brelse
(
bh
);
bh
=
reiserfs
_bread
(
s
,
offset
/
s
->
s_blocksize
);
bh
=
sb
_bread
(
s
,
offset
/
s
->
s_blocksize
);
if
(
!
bh
)
{
printk
(
"sh-2007: read_super_block: "
"bread failed (dev %s, block %lu, size %lu)
\n
"
,
...
...
include/linux/reiserfs_fs.h
View file @
b1a4861d
...
...
@@ -1937,14 +1937,6 @@ void reiserfs_unmap_buffer(struct buffer_head *) ;
extern
struct
inode_operations
reiserfs_file_inode_operations
;
extern
struct
file_operations
reiserfs_file_operations
;
extern
struct
address_space_operations
reiserfs_address_space_operations
;
int
get_new_buffer
(
struct
reiserfs_transaction_handle
*
th
,
struct
buffer_head
*
,
struct
buffer_head
**
,
struct
path
*
);
/* buffer2.c */
struct
buffer_head
*
reiserfs_getblk
(
struct
super_block
*
super
,
int
n_block
);
void
wait_buffer_until_released
(
const
struct
buffer_head
*
bh
);
struct
buffer_head
*
reiserfs_bread
(
struct
super_block
*
super
,
int
n_block
);
/* fix_nodes.c */
#ifdef CONFIG_REISERFS_CHECK
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment