Re: [PATCH] Re: fs corruption with invalidate_buffers()

2000-12-21 Thread Alexander Viro
On Thu, 21 Dec 2000, Linus Torvalds wrote: > > > On Fri, 22 Dec 2000, Jan Niehusmann wrote: > > > > This is the result - against test12-pre7, but works well with > > test13-pre3: > > This looks bogus. It is bogus. My apologies. - To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] Re: fs corruption with invalidate_buffers()

2000-12-21 Thread Jan Niehusmann
On Thu, Dec 21, 2000 at 05:01:00PM -0800, Linus Torvalds wrote: > > > On Fri, 22 Dec 2000, Jan Niehusmann wrote: > > > > The test I did initially was the following: > > > > if(!atomic_read(&bh->b_count) && > > (destroy_dirty_buffers || !buffer_dirty(bh)) > > && ! (bh->b_page && bh->b_p

Re: [PATCH] Re: fs corruption with invalidate_buffers()

2000-12-21 Thread Linus Torvalds
On Fri, 22 Dec 2000, Jan Niehusmann wrote: > > The test I did initially was the following: > > if(!atomic_read(&bh->b_count) && > (destroy_dirty_buffers || !buffer_dirty(bh)) > && ! (bh->b_page && bh->b_page->mapping) > ) > > That is, I was explicitely checking for a mapped

Re: [PATCH] Re: fs corruption with invalidate_buffers()

2000-12-21 Thread Jan Niehusmann
On Thu, Dec 21, 2000 at 04:37:30PM -0800, Linus Torvalds wrote: > This looks bogus. It may be - I just did what Al told me without really understanding it ;-) The test I did initially was the following: if(!atomic_read(&bh->b_count) && (destroy_dirty_buffers || !buffer_dirty(bh))

Re: [PATCH] Re: fs corruption with invalidate_buffers()

2000-12-21 Thread Linus Torvalds
On Fri, 22 Dec 2000, Jan Niehusmann wrote: > > This is the result - against test12-pre7, but works well with > test13-pre3: This looks bogus. You can't test "bh->b_next!=0", because that is entirely meaningless. b_next can be NULL either because the buffer isn't hashed, or because the buffe

Re: [PATCH] Re: fs corruption with invalidate_buffers()

2000-12-07 Thread Jan Niehusmann
On Thu, Dec 07, 2000 at 05:26:46PM -0500, Alexander Viro wrote: > That invalidate_buffers() should leave the unhashed ones alone. If it can't > be found via getblk() - just leave it as is. > > IOW, let it skip bh if (bh->b_next == NULL && !destroy_dirty_buffers). > No warnings needed - it's a nor

Re: [PATCH] Re: fs corruption with invalidate_buffers()

2000-12-07 Thread Alexander Viro
On Thu, 7 Dec 2000, Udo A. Steinberg wrote: > Jan Niehusmann wrote: > > > > The following patch actually prevents the corruption I described. > > > > I'd like to hear from the people having problems with hdparm, if it helps > > them, too. > > Yes, it prevents the issue. > > > Please note th

Re: [PATCH] Re: fs corruption with invalidate_buffers()

2000-12-07 Thread Udo A. Steinberg
Jan Niehusmann wrote: > > The following patch actually prevents the corruption I described. > > I'd like to hear from the people having problems with hdparm, if it helps > them, too. Yes, it prevents the issue. > Please note that the patch circumvents the problem more than it fixes it. > The t