lkml.org 
[lkml]   [2000]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] Updated ext2 to use new mark_buffers_dirty interface
Hi.

(I think I have seen you name mentioned as (co-)maintainer of ext2.
Hence this mail.)

I have changed the interface to mark_buffer_dirty (as per Tigran
Aivazian's suggestion). This impacts ext2 as per the following
patch.

diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/ext2/balloc.c linux/fs/ext2/balloc.c
--- linux-240test8-pre2/fs/ext2/balloc.c Thu Aug 10 16:29:53 2000
+++ linux/fs/ext2/balloc.c Mon Sep 4 20:13:07 2000
@@ -325,10 +325,10 @@
}
}

- mark_buffer_dirty(bh2, 1);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ mark_buffer_dirty(bh2);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh);

- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
if (sb->s_flags & MS_SYNCHRONOUS) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh);
@@ -582,7 +582,7 @@

j = tmp;

- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
if (sb->s_flags & MS_SYNCHRONOUS) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh);
@@ -600,9 +600,9 @@
"Goal hits %d of %d.\n", j, goal_hits, goal_attempts);

gdp->bg_free_blocks_count = cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) - 1);
- mark_buffer_dirty(bh2, 1);
+ mark_buffer_dirty(bh2);
es->s_free_blocks_count = cpu_to_le32(le32_to_cpu(es->s_free_blocks_count) - 1);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh);
sb->s_dirt = 1;
unlock_super (sb);
*err = 0;
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/ext2/ialloc.c linux/fs/ext2/ialloc.c
--- linux-240test8-pre2/fs/ext2/ialloc.c Sun Sep 3 22:23:39 2000
+++ linux/fs/ext2/ialloc.c Mon Sep 4 20:13:41 2000
@@ -230,12 +230,12 @@
gdp->bg_used_dirs_count =
cpu_to_le16(le16_to_cpu(gdp->bg_used_dirs_count) - 1);
}
- mark_buffer_dirty(bh2, 1);
+ mark_buffer_dirty(bh2);
es->s_free_inodes_count =
cpu_to_le32(le32_to_cpu(es->s_free_inodes_count) + 1);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh);
}
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
if (sb->s_flags & MS_SYNCHRONOUS) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh);
@@ -388,7 +388,7 @@
"bit already set for inode %d", j);
goto repeat;
}
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
if (sb->s_flags & MS_SYNCHRONOUS) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh);
@@ -404,7 +404,7 @@
return NULL;
}
gdp->bg_free_inodes_count = 0;
- mark_buffer_dirty(bh2, 1);
+ mark_buffer_dirty(bh2);
}
goto repeat;
}
@@ -423,10 +423,10 @@
if (S_ISDIR(mode))
gdp->bg_used_dirs_count =
cpu_to_le16(le16_to_cpu(gdp->bg_used_dirs_count) + 1);
- mark_buffer_dirty(bh2, 1);
+ mark_buffer_dirty(bh2);
es->s_free_inodes_count =
cpu_to_le32(le32_to_cpu(es->s_free_inodes_count) - 1);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh);
sb->s_dirt = 1;
inode->i_mode = mode;
inode->i_sb = sb;
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/ext2/inode.c linux/fs/ext2/inode.c
--- linux-240test8-pre2/fs/ext2/inode.c Sun Sep 3 22:23:39 2000
+++ linux/fs/ext2/inode.c Mon Sep 4 20:14:11 2000
@@ -433,7 +433,7 @@
branch[n].p = (u32*) bh->b_data + offsets[n];
*branch[n].p = branch[n].key;
mark_buffer_uptodate(bh, 1);
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
if (IS_SYNC(inode) || inode->u.ext2_i.i_osync) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh);
@@ -498,7 +498,7 @@

/* had we spliced it onto indirect block? */
if (where->bh) {
- mark_buffer_dirty(where->bh, 1);
+ mark_buffer_dirty(where->bh);
if (IS_SYNC(inode) || inode->u.ext2_i.i_osync) {
ll_rw_block (WRITE, 1, &where->bh);
wait_on_buffer(where->bh);
@@ -620,7 +620,7 @@
wait_on_buffer(bh);
memset(bh->b_data, 0, inode->i_sb->s_blocksize);
mark_buffer_uptodate(bh, 1);
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
}
return bh;
}
@@ -932,7 +932,7 @@
if (partial == chain)
mark_inode_dirty(inode);
else
- mark_buffer_dirty(partial->bh, 1);
+ mark_buffer_dirty(partial->bh);
ext2_free_branches(inode, &nr, &nr+1, (chain+n-1) - partial);
}
/* Clear the ends of indirect blocks on the shared branch */
@@ -941,7 +941,7 @@
partial->p + 1,
(u32*)partial->bh->b_data + addr_per_block,
(chain+n-1) - partial);
- mark_buffer_dirty(partial->bh, 1);
+ mark_buffer_dirty(partial->bh);
if (IS_SYNC(inode)) {
ll_rw_block (WRITE, 1, &partial->bh);
wait_on_buffer (partial->bh);
@@ -1233,7 +1233,7 @@
raw_inode->i_block[0] = cpu_to_le32(kdev_t_to_nr(inode->i_rdev));
else for (block = 0; block < EXT2_N_BLOCKS; block++)
raw_inode->i_block[block] = inode->u.ext2_i.i_data[block];
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
if (do_sync) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh);
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/ext2/namei.c linux/fs/ext2/namei.c
--- linux-240test8-pre2/fs/ext2/namei.c Sun Sep 3 22:23:39 2000
+++ linux/fs/ext2/namei.c Mon Sep 4 20:14:36 2000
@@ -298,7 +298,7 @@
dir->u.ext2_i.i_flags &= ~EXT2_BTREE_FL;
mark_inode_dirty(dir);
dir->i_version = ++event;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
if (IS_SYNC(dir)) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh);
@@ -339,7 +339,7 @@
else
de->inode = 0;
dir->i_version = ++event;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
if (IS_SYNC(dir)) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh);
@@ -451,7 +451,7 @@
strcpy (de->name, "..");
ext2_set_de_type(dir->i_sb, de, S_IFDIR);
inode->i_nlink = 2;
- mark_buffer_dirty(dir_block, 1);
+ mark_buffer_dirty(dir_block);
brelse (dir_block);
inode->i_mode = S_IFDIR | mode;
if (dir->i_mode & S_ISGID)
@@ -757,7 +757,7 @@
EXT2_FEATURE_INCOMPAT_FILETYPE))
new_de->file_type = old_de->file_type;
new_dir->i_version = ++event;
- mark_buffer_dirty(new_bh, 1);
+ mark_buffer_dirty(new_bh);
if (IS_SYNC(new_dir)) {
ll_rw_block (WRITE, 1, &new_bh);
wait_on_buffer (new_bh);
@@ -788,7 +788,7 @@
mark_inode_dirty(old_dir);
if (dir_bh) {
PARENT_INO(dir_bh->b_data) = le32_to_cpu(new_dir->i_ino);
- mark_buffer_dirty(dir_bh, 1);
+ mark_buffer_dirty(dir_bh);
old_dir->i_nlink--;
mark_inode_dirty(old_dir);
if (new_inode) {
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/ext2/super.c linux/fs/ext2/super.c
--- linux-240test8-pre2/fs/ext2/super.c Thu Aug 10 16:29:53 2000
+++ linux/fs/ext2/super.c Mon Sep 4 20:15:06 2000
@@ -38,7 +38,7 @@
sb->u.ext2_sb.s_mount_state |= EXT2_ERROR_FS;
sb->u.ext2_sb.s_es->s_state =
cpu_to_le16(le16_to_cpu(sb->u.ext2_sb.s_es->s_state) | EXT2_ERROR_FS);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh);
sb->s_dirt = 1;
}
va_start (args, fmt);
@@ -68,7 +68,7 @@
sb->u.ext2_sb.s_mount_state |= EXT2_ERROR_FS;
sb->u.ext2_sb.s_es->s_state =
cpu_to_le16(le16_to_cpu(sb->u.ext2_sb.s_es->s_state) | EXT2_ERROR_FS);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh);
sb->s_dirt = 1;
}
va_start (args, fmt);
@@ -101,7 +101,7 @@

if (!(sb->s_flags & MS_RDONLY)) {
sb->u.ext2_sb.s_es->s_state = le16_to_cpu(sb->u.ext2_sb.s_mount_state);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh);
}
db_count = sb->u.ext2_sb.s_db_per_group;
for (i = 0; i < db_count; i++)
@@ -286,7 +286,7 @@
es->s_max_mnt_count = (__s16) cpu_to_le16(EXT2_DFL_MAX_MNT_COUNT);
es->s_mnt_count=cpu_to_le16(le16_to_cpu(es->s_mnt_count) + 1);
es->s_mtime = cpu_to_le32(CURRENT_TIME);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh);
sb->s_dirt = 1;
if (test_opt (sb, DEBUG))
printk ("[EXT II FS %s, %s, bs=%lu, fs=%lu, gc=%lu, "
@@ -612,7 +612,7 @@
struct ext2_super_block * es)
{
es->s_wtime = cpu_to_le32(CURRENT_TIME);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh);
sb->s_dirt = 0;
}

@@ -677,7 +677,7 @@
*/
es->s_state = cpu_to_le16(sb->u.ext2_sb.s_mount_state);
es->s_mtime = cpu_to_le32(CURRENT_TIME);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh);
sb->s_dirt = 1;
ext2_commit_super (sb, es);
}
--
Regards,
Rasmus(rasmus@jaquet.dk)

Good judgement comes from experience. Experience comes from bad judgement.
-- Jim Horning
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.081 / U:3.856 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site