On Thu, Apr 26, 2001 at 04:49:20PM -0400, Alexander Viro wrote: > getblk(); if (!buffer_uptodate) wait_on_buffer(); > is not in that class. It _is_ OK on UP as long as we don't block, but on > SMP it doesn't guarantee anything - buffer_head can be in any state > when we are done. IMO all such places require fixing. Yes, actually it's probably ok for most of other "fs" against "fs" cases because those fses still hold the big lock while handling metadata but they should really use the lock_buffer way if they want to protect against the block_dev accesses too. > How about adding > if (!buffer_uptodate(bh)) { > printk(KERN_ERR "IO error or racy use of wait_on_buffer()"); > show_task(current); > } > in the end of wait_on_buffer() for a while? At the _top_ of wait_on_buffer would be better then at the end. Andrea - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Re: [PATCH] SMP race in ext2 - metadata corruption. Linus Torvalds
- Re: [PATCH] SMP race in ext2 - metadata corrup... Alexander Viro
- Re: [PATCH] SMP race in ext2 - metadata co... Alexander Viro
- Re: [PATCH] SMP race in ext2 - metadat... Andrea Arcangeli
- Re: [PATCH] SMP race in ext2 - metadata corrup... Andrea Arcangeli
- Re: [PATCH] SMP race in ext2 - metadata co... Alexander Viro
- Re: [PATCH] SMP race in ext2 - metadat... Andrea Arcangeli
- Re: [PATCH] SMP race in ext2 - met... Alexander Viro
- Re: [PATCH] SMP race in ext2 ... Linus Torvalds
- Re: [PATCH] SMP race in ext2 ... Alexander Viro
- Re: [PATCH] SMP race in ext2 ... Andrea Arcangeli
- Re: [PATCH] SMP race in ext2 ... Alexander Viro
- Re: [PATCH] SMP race in ext2 ... Andrea Arcangeli
- Re: [PATCH] SMP race in ext2 ... Linus Torvalds
- Re: [PATCH] SMP race in ext2 ... Andrea Arcangeli
- Re: [PATCH] SMP race in ext2 ... Andrea Arcangeli
- Re: [PATCH] SMP race in ext2 ... Andrzej Krzysztofowicz
- Re: [PATCH] SMP race in ext2 ... LA Walsh
- Re: [PATCH] SMP race in ext2 ... dek_ml
- Re: [PATCH] SMP race in ext2 ... Vojtech Pavlik
- Re: [PATCH] SMP race in ext2 ... Alexander Viro