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

(I hope you are the code maintainer for affs. Your name is in the
affs files.)

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

diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/affs/amigaffs.c linux/fs/affs/amigaffs.c
--- linux-240test8-pre2/fs/affs/amigaffs.c Wed Jun 24 23:30:09 1998
+++ linux/fs/affs/amigaffs.c Mon Sep 4 20:40:55 2000
@@ -79,7 +79,7 @@
DIR_END(file->b_data,inode)->hash_chain = cpu_to_be32(next);
((s32 *)bh->b_data)[offset] = cpu_to_be32(ino);
affs_fix_checksum(AFFS_I2BSIZE(inode),bh->b_data,5);
- mark_buffer_dirty(bh,1);
+ mark_buffer_dirty(bh);
affs_brelse(bh);

return 0;
@@ -130,7 +130,7 @@
if (ownkey == key) {
((s32 *)bh->b_data)[offset] = FILE_END(dbh->b_data,inode)->hash_chain;
affs_fix_checksum(AFFS_I2BSIZE(inode),bh->b_data,5);
- mark_buffer_dirty(bh,1);
+ mark_buffer_dirty(bh);
affs_brelse(bh);
retval = 0;
break;
@@ -178,7 +178,7 @@
FILE_END(bh->b_data,inode)->link_chain =
FILE_END(dbh->b_data,inode)->link_chain;
affs_fix_checksum(AFFS_I2BSIZE(inode),bh->b_data,5);
- mark_buffer_dirty(bh,1);
+ mark_buffer_dirty(bh);
affs_brelse(bh);
retval = 0;
break;
@@ -261,7 +261,7 @@
return error;
}
affs_fix_checksum(AFFS_I2BSIZE(inode),bh->b_data,5);
- mark_buffer_dirty(bh,1);
+ mark_buffer_dirty(bh);
affs_brelse(link_bh);
affs_free_block(inode->i_sb,link_ino);
/* Mark the link's parent dir as changed, too. */
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/affs/bitmap.c linux/fs/affs/bitmap.c
--- linux-240test8-pre2/fs/affs/bitmap.c Wed Apr 12 18:47:28 2000
+++ linux/fs/affs/bitmap.c Mon Sep 4 20:42:07 2000
@@ -93,7 +93,7 @@
else {
sb->u.affs_sb.s_alloc[zone_no].az_free++;
((u32 *)bm->bm_bh->b_data)[0] = cpu_to_be32(be32_to_cpu(((u32 *)bm->bm_bh->b_data)[0]) - blk);
- mark_buffer_dirty(bm->bm_bh,1);
+ mark_buffer_dirty(bm->bm_bh);
sb->s_dirt = 1;
}
if (--bm->bm_count == 0) {
@@ -176,7 +176,7 @@
w = ~w - be32_to_cpu(bm[i]);
bm[0] = cpu_to_be32(be32_to_cpu(bm[0]) + w);
unlock_super(sb);
- mark_buffer_dirty(zone->z_bm->bm_bh,1);
+ mark_buffer_dirty(zone->z_bm->bm_bh);
sb->s_dirt = 1;
zone->z_lru_time = jiffies;

diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/affs/file.c linux/fs/affs/file.c
--- linux-240test8-pre2/fs/affs/file.c Mon May 8 22:51:01 2000
+++ linux/fs/affs/file.c Mon Sep 4 20:41:24 2000
@@ -447,12 +447,12 @@
DATA_FRONT(ebh)->header_key = cpu_to_be32(inode->i_ino);
DATA_FRONT(ebh)->sequence_number = cpu_to_be32(inode->u.affs_i.i_lastblock + 1);
affs_fix_checksum(AFFS_I2BSIZE(inode), ebh->b_data, 5);
- mark_buffer_dirty(ebh, 0);
+ mark_buffer_dirty(ebh);
if (pbh) {
DATA_FRONT(pbh)->data_size = cpu_to_be32(AFFS_I2BSIZE(inode) - 24);
DATA_FRONT(pbh)->next_data = cpu_to_be32(nkey);
affs_fix_checksum(AFFS_I2BSIZE(inode),pbh->b_data,5);
- mark_buffer_dirty(pbh,0);
+ mark_buffer_dirty(pbh);
affs_brelse(pbh);
}
pbh = ebh;
@@ -466,7 +466,7 @@
fdp->first_data = AFFS_BLOCK(bh->b_data,inode,0);
fdp->block_count = cpu_to_be32(j);
affs_fix_checksum(AFFS_I2BSIZE(inode),bh->b_data,5);
- mark_buffer_dirty(bh,1);
+ mark_buffer_dirty(bh);
}

if (block < j) {
@@ -495,10 +495,10 @@
FILE_END(ebh->b_data,inode)->secondary_type = cpu_to_be32(ST_FILE);
FILE_END(ebh->b_data,inode)->parent = cpu_to_be32(inode->i_ino);
affs_fix_checksum(AFFS_I2BSIZE(inode),ebh->b_data,5);
- mark_buffer_dirty(ebh, 1);
+ mark_buffer_dirty(ebh);
FILE_END(bh->b_data,inode)->extension = cpu_to_be32(key);
affs_fix_checksum(AFFS_I2BSIZE(inode),bh->b_data,5);
- mark_buffer_dirty(bh,1);
+ mark_buffer_dirty(bh);
affs_brelse(bh);
bh = ebh;
}
@@ -678,7 +678,7 @@
rem = do_div(tmp, net_blocksize);
DATA_FRONT(bh)->data_size = cpu_to_be32(rem ? rem : net_blocksize);
affs_fix_checksum(blocksize,bh->b_data,5);
- mark_buffer_dirty(bh,0);
+ mark_buffer_dirty(bh);
}
goto out_truncate;
}
@@ -733,7 +733,7 @@
first = 0;
*keyp = 0;
affs_fix_checksum(blocksize,bh->b_data,5);
- mark_buffer_dirty(bh,1);
+ mark_buffer_dirty(bh);
} else
first -= AFFS_I2HSIZE(inode);
affs_brelse(bh);
@@ -766,7 +766,7 @@
((struct data_front *)bh->b_data)->next_data = 0;
affs_fix_checksum(blocksize,bh->b_data,5);
}
- mark_buffer_dirty(bh,1);
+ mark_buffer_dirty(bh);
} else
affs_error(inode->i_sb,"truncate","Cannot read block %d",block);
}
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/affs/inode.c linux/fs/affs/inode.c
--- linux-240test8-pre2/fs/affs/inode.c Mon Jul 31 21:04:05 2000
+++ linux/fs/affs/inode.c Mon Sep 4 20:41:40 2000
@@ -232,7 +232,7 @@
}
}
affs_fix_checksum(AFFS_I2BSIZE(inode),bh->b_data,5);
- mark_buffer_dirty(bh,1);
+ mark_buffer_dirty(bh);
brelse(bh);
unlock_kernel();
}
@@ -392,7 +392,7 @@
affs_fix_checksum(AFFS_I2BSIZE(link),link_bh->b_data,5);
link->i_version = ++event;
mark_inode_dirty(link);
- mark_buffer_dirty(link_bh,1);
+ mark_buffer_dirty(link_bh);
}
affs_fix_checksum(AFFS_I2BSIZE(inode),inode_bh->b_data,5);
affs_fix_checksum(AFFS_I2BSIZE(dir),dir_bh->b_data,5);
@@ -402,8 +402,8 @@

mark_inode_dirty(dir);
mark_inode_dirty(inode);
- mark_buffer_dirty(dir_bh,1);
- mark_buffer_dirty(inode_bh,1);
+ mark_buffer_dirty(dir_bh);
+ mark_buffer_dirty(inode_bh);

addentry_done:
affs_brelse(dir_bh);
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/affs/namei.c linux/fs/affs/namei.c
--- linux-240test8-pre2/fs/affs/namei.c Mon Jul 31 21:03:23 2000
+++ linux/fs/affs/namei.c Mon Sep 4 20:41:48 2000
@@ -440,7 +440,7 @@
symname++;
}
*p = 0;
- mark_buffer_dirty(bh,1);
+ mark_buffer_dirty(bh);
affs_brelse(bh);
mark_inode_dirty(inode);

@@ -592,7 +592,7 @@
retval = 0;
mark_inode_dirty(new_dir);
mark_inode_dirty(old_dir);
- mark_buffer_dirty(old_bh,1);
+ mark_buffer_dirty(old_bh);

end_rename:
affs_brelse(old_bh);
diff -u --recursive -X misc/dontdiff linux-240test8-pre2/fs/affs/super.c linux/fs/affs/super.c
--- linux-240test8-pre2/fs/affs/super.c Mon Mar 13 21:35:39 2000
+++ linux/fs/affs/super.c Mon Sep 4 20:42:00 2000
@@ -52,7 +52,7 @@
secs_to_datestamp(CURRENT_TIME,
&ROOT_END_S(sb->u.affs_sb.s_root_bh->b_data,sb)->disk_altered);
affs_fix_checksum(sb->s_blocksize,sb->u.affs_sb.s_root_bh->b_data,5);
- mark_buffer_dirty(sb->u.affs_sb.s_root_bh,1);
+ mark_buffer_dirty(sb->u.affs_sb.s_root_bh);
}

if (sb->u.affs_sb.s_prefix)
@@ -88,7 +88,7 @@
secs_to_datestamp(CURRENT_TIME,
&ROOT_END_S(sb->u.affs_sb.s_root_bh->b_data,sb)->disk_altered);
affs_fix_checksum(sb->s_blocksize,sb->u.affs_sb.s_root_bh->b_data,5);
- mark_buffer_dirty(sb->u.affs_sb.s_root_bh,1);
+ mark_buffer_dirty(sb->u.affs_sb.s_root_bh);
sb->s_dirt = !clean; /* redo until bitmap synced */
} else
sb->s_dirt = 0;
@@ -491,7 +491,7 @@
chksum = cpu_to_be32(0x7FFFFFFF >> (31 - key));
((u32 *)bb->b_data)[ptype] &= chksum;
affs_fix_checksum(s->s_blocksize,bb->b_data,0);
- mark_buffer_dirty(bb,1);
+ mark_buffer_dirty(bb);
bmalt = 1;
}
ptype = (size + 31) & ~0x1F;
@@ -553,7 +553,7 @@
secs_to_datestamp(CURRENT_TIME,&ROOT_END(
s->u.affs_sb.s_root_bh->b_data,root_inode)->disk_altered);
affs_fix_checksum(s->s_blocksize,s->u.affs_sb.s_root_bh->b_data,5);
- mark_buffer_dirty(s->u.affs_sb.s_root_bh,1);
+ mark_buffer_dirty(s->u.affs_sb.s_root_bh);
}
affs_make_zones(s);
}
--
Regards,
Rasmus(rasmus@jaquet.dk)

I've overclocked my keyboard interface. It's quite messy dipping my
hands into the mineral oil, but *MAN* is my keyboard ever fast now!
- Anonymous Coward
-
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.049 / U:3.260 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site