Messages in this thread |  | | Date | Wed, 3 Oct 2001 00:21:15 -0400 (EDT) | From | Alexander Viro <> | Subject | Re: 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/
|  |