lkml.org 
[lkml]   [2001]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.11-pre2 fs/buffer.c: invalidate: busy buffer


On Wed, 3 Oct 2001, Linus Torvalds wrote:

> It's harmless, although I hope that the LVM people will become a bit
> less invalidation-happy as a result of the warning (it's always happened
> before, it just hasn't warned about it in earlier kernels).

AFAICS, md.c also doesn't play nice with buffe cache.

fsync_dev(dev);
set_blocksize(dev, MD_SB_BYTES);
bh = getblk(dev, sb_offset / MD_SB_BLOCKS, MD_SB_BYTES);
if (!bh) {
printk(GETBLK_FAILED, partition_name(dev));
return 1;
}
memset(bh->b_data,0,bh->b_size);
sb = (mdp_super_t *) bh->b_data;
memcpy(sb, rdev->sb, MD_SB_BYTES);

mark_buffer_uptodate(bh, 1);
mark_buffer_dirty(bh);
ll_rw_block(WRITE, 1, &bh);
wait_on_buffer(bh);
brelse(bh);
fsync_dev(dev);

is not a good thing to do (write_disk_sb()). Not to mention the fact that
set_blocksize() looks bogus, the code is obviously racy. Think what will
happen if somebody is reading from device at that moment.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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