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 hpfs to use new mark_buffers_dirty interface
Hi.

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

diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/hpfs/anode.c linux/fs/hpfs/anode.c
--- linux-240test8-pre2/fs/hpfs/anode.c Tue Oct 19 22:52:52 1999
+++ linux/fs/hpfs/anode.c Mon Sep 4 20:17:27 2000
@@ -84,7 +84,7 @@
if (btree->internal) {
a = btree->u.internal[n].down;
btree->u.internal[n].file_secno = -1;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
if (s->s_hpfs_chk)
if (hpfs_stop_cycles(s, a, &c1, &c2, "hpfs_add_sector_to_btree #1")) return -1;
@@ -102,7 +102,7 @@
}
if (hpfs_alloc_if_possible(s, se = btree->u.external[n].disk_secno + btree->u.external[n].length)) {
btree->u.external[n].length++;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
return se;
}
@@ -139,7 +139,7 @@
btree->first_free = (char *)&(btree->u.internal[1]) - (char *)btree;
btree->u.internal[0].file_secno = -1;
btree->u.internal[0].down = na;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
} else if (!(ranode = hpfs_alloc_anode(s, /*a*/0, &ra, &bh2))) {
brelse(bh);
brelse(bh1);
@@ -156,7 +156,7 @@
btree->u.external[n].disk_secno = se;
btree->u.external[n].file_secno = fs;
btree->u.external[n].length = 1;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
if ((a == node && fnod) || na == -1) return se;
c2 = 0;
@@ -176,14 +176,14 @@
btree->u.internal[n].file_secno = -1;
btree->u.internal[n].down = na;
btree->u.internal[n-1].file_secno = fs;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
brelse(bh2);
hpfs_free_sectors(s, ra, 1);
if ((anode = hpfs_map_anode(s, na, &bh))) {
anode->up = up;
anode->btree.fnode_parent = up == node && fnod;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}
return se;
@@ -191,7 +191,7 @@
up = up != node ? anode->up : -1;
btree->u.internal[btree->n_used_nodes - 1].file_secno = /*fs*/-1;
if (up == -1) anode->up = ra;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
a = na;
if ((anode = hpfs_alloc_anode(s, a, &na, &bh))) {
@@ -202,11 +202,11 @@
anode->btree.first_free = 16;
anode->btree.u.internal[0].down = a;
anode->btree.u.internal[0].file_secno = -1;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
if ((anode = hpfs_map_anode(s, a, &bh))) {
anode->up = na;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}
} else na = a;
@@ -214,7 +214,7 @@
if ((anode = hpfs_map_anode(s, na, &bh))) {
anode->up = node;
if (fnod) anode->btree.fnode_parent = 1;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}
if (!fnod) {
@@ -239,7 +239,7 @@
if ((unode = hpfs_map_anode(s, ranode->u.internal[n].down, &bh1))) {
unode->up = ra;
unode->btree.fnode_parent = 0;
- mark_buffer_dirty(bh1, 1);
+ mark_buffer_dirty(bh1);
brelse(bh1);
}
}
@@ -251,9 +251,9 @@
btree->u.internal[0].down = ra;
btree->u.internal[1].file_secno = -1;
btree->u.internal[1].down = na;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
- mark_buffer_dirty(bh2, 1);
+ mark_buffer_dirty(bh2);
brelse(bh2);
return se;
}
@@ -367,7 +367,7 @@
return -1;
l = 0x200 - (pos & 0x1ff); if (l > len) l = len;
memcpy(data + (pos & 0x1ff), buf, l);
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
buf += l; pos += l; len -= l;
}
@@ -411,7 +411,7 @@
btree->n_used_nodes = 0;
btree->first_free = 8;
btree->internal = 0;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
} else hpfs_free_sectors(s, f, 1);
brelse(bh);
return;
@@ -429,7 +429,7 @@
btree->n_used_nodes = i + 1;
btree->n_free_nodes = nodes - btree->n_used_nodes;
btree->first_free = 8 + 8 * btree->n_used_nodes;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
if (btree->u.internal[i].file_secno == secs) {
brelse(bh);
return;
@@ -463,7 +463,7 @@
btree->n_used_nodes = i + 1;
btree->n_free_nodes = nodes - btree->n_used_nodes;
btree->first_free = 8 + 12 * btree->n_used_nodes;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}

diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/hpfs/buffer.c linux/fs/hpfs/buffer.c
--- linux-240test8-pre2/fs/hpfs/buffer.c Mon Jul 31 21:05:02 2000
+++ linux/fs/hpfs/buffer.c Mon Sep 4 20:17:54 2000
@@ -261,8 +261,8 @@
memcpy(qbh->bh[1]->b_data, qbh->data + 512, 512);
memcpy(qbh->bh[2]->b_data, qbh->data + 2 * 512, 512);
memcpy(qbh->bh[3]->b_data, qbh->data + 3 * 512, 512);
- mark_buffer_dirty(qbh->bh[0],1);
- mark_buffer_dirty(qbh->bh[1],1);
- mark_buffer_dirty(qbh->bh[2],1);
- mark_buffer_dirty(qbh->bh[3],1);
+ mark_buffer_dirty(qbh->bh[0]);
+ mark_buffer_dirty(qbh->bh[1]);
+ mark_buffer_dirty(qbh->bh[2]);
+ mark_buffer_dirty(qbh->bh[3]);
}
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/hpfs/dnode.c linux/fs/hpfs/dnode.c
--- linux-240test8-pre2/fs/hpfs/dnode.c Tue Oct 19 22:52:52 1999
+++ linux/fs/hpfs/dnode.c Mon Sep 4 20:29:42 2000
@@ -337,7 +337,7 @@
return 1;
}
fnode->u.external[0].disk_secno = rdno;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
d->up = ad->up = i->i_hpfs_dno = rdno;
d->root_dnode = ad->root_dnode = 0;
@@ -535,7 +535,7 @@
}
if ((fnode = hpfs_map_fnode(i->i_sb, up, &bh))) {
fnode->u.external[0].disk_secno = down;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}
i->i_hpfs_dno = down;
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/hpfs/ea.c linux/fs/hpfs/ea.c
--- linux-240test8-pre2/fs/hpfs/ea.c Mon Dec 13 16:59:51 1999
+++ linux/fs/hpfs/ea.c Mon Sep 4 20:30:18 2000
@@ -277,7 +277,7 @@
fnode->ea_size_s = 0;
fnode->ea_secno = n;
fnode->ea_anode = 0;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}
pos = fnode->ea_size_l + 5 + strlen(key) + size;
@@ -307,7 +307,7 @@
anode->u.external[0].disk_secno = fnode->ea_secno;
anode->u.external[0].file_secno = 0;
anode->u.external[0].length = len;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
fnode->ea_anode = 1;
fnode->ea_secno = a_s;*/
@@ -329,7 +329,7 @@
}
memcpy(b2, b1, 512);
brelse(bh1);
- mark_buffer_dirty(bh2, 1);
+ mark_buffer_dirty(bh2);
brelse(bh2);
}
hpfs_free_sectors(s, fnode->ea_secno, len);
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/hpfs/inode.c linux/fs/hpfs/inode.c
--- linux-240test8-pre2/fs/hpfs/inode.c Mon Jul 31 21:04:05 2000
+++ linux/fs/hpfs/inode.c Mon Sep 4 20:30:27 2000
@@ -291,7 +291,7 @@
hpfs_brelse4(&qbh);
} else hpfs_error(i->i_sb, "directory %08x doesn't have '.' entry", i->i_ino);
}
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}

diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/hpfs/namei.c linux/fs/hpfs/namei.c
--- linux-240test8-pre2/fs/hpfs/namei.c Mon Jul 31 21:04:05 2000
+++ linux/fs/hpfs/namei.c Mon Sep 4 20:30:47 2000
@@ -62,7 +62,7 @@
de->first = de->directory = 1;
/*de->hidden = de->system = 0;*/
de->fnode = fno;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
hpfs_mark_4buffers_dirty(&qbh0);
hpfs_brelse4(&qbh0);
@@ -128,7 +128,7 @@
fnode->len = len;
memcpy(fnode->name, name, len > 15 ? 15 : len);
fnode->up = dir->i_ino;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
hpfs_lock_iget(dir->i_sb, 2);
if ((result = iget(dir->i_sb, fno))) {
@@ -196,7 +196,7 @@
fnode->len = len;
memcpy(fnode->name, name, len > 15 ? 15 : len);
fnode->up = dir->i_ino;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
hpfs_lock_iget(dir->i_sb, 2);
if ((result = iget(dir->i_sb, fno))) {
result->i_hpfs_parent_dir = dir->i_ino;
@@ -258,7 +258,7 @@
fnode->len = len;
memcpy(fnode->name, name, len > 15 ? 15 : len);
fnode->up = dir->i_ino;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
hpfs_lock_iget(dir->i_sb, 2);
if ((result = iget(dir->i_sb, fno))) {
@@ -276,7 +276,7 @@
result->i_data.a_ops = &hpfs_symlink_aops;
if ((fnode = hpfs_map_fnode(dir->i_sb, fno, &bh))) {
hpfs_set_ea(result, fnode, "SYMLINK", (char *)symlink, strlen(symlink));
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}
hpfs_write_inode_nolock(result);
@@ -523,7 +523,7 @@
fnode->len = new_len;
memcpy(fnode->name, new_name, new_len>15?15:new_len);
if (new_len < 15) memset(&fnode->name[new_len], 0, 15 - new_len);
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}
i->i_hpfs_conv = i->i_sb->s_hpfs_conv;
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/hpfs/super.c linux/fs/hpfs/super.c
--- linux-240test8-pre2/fs/hpfs/super.c Mon Mar 13 21:35:39 2000
+++ linux/fs/hpfs/super.c Mon Sep 4 20:31:02 2000
@@ -21,7 +21,7 @@
if ((sb = hpfs_map_sector(s, 17, &bh, 0))) {
sb->dirty = 1;
sb->old_wrote = 0;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}
}
@@ -38,7 +38,7 @@
if ((sb = hpfs_map_sector(s, 17, &bh, 0))) {
sb->dirty = s->s_hpfs_chkdsk > 1 - s->s_hpfs_was_error;
sb->old_wrote = s->s_hpfs_chkdsk >= 2 && !s->s_hpfs_was_error;
- mark_buffer_dirty(bh, 1);
+ mark_buffer_dirty(bh);
brelse(bh);
}
}
@@ -466,7 +466,7 @@
if (!(s->s_flags & MS_RDONLY)) {
spareblock->dirty = 1;
spareblock->old_wrote = 0;
- mark_buffer_dirty(bh2, 1);
+ mark_buffer_dirty(bh2);
}

if (spareblock->hotfixes_used || spareblock->n_spares_used) {
--
Regards,
Rasmus(rasmus@jaquet.dk)

"I'm not going to have some reporters pawing through our papers. We are
the president." -Hillary Clinton commenting on the release of subpoenaed
documents.
-
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.048 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site