[reiserfs-list] Re: [PATCH] Re: bug? in using generic read/write functions toread/write block devices in 2.4.11-pre2

2001-10-03 Thread Linus Torvalds


On Wed, 3 Oct 2001, Alexander Viro wrote:

 Ehh... Linus, both blkdev_get() and blkdev_open() should set -i_blkbits.

Duh. I couldn't even _imagine_ that we'd be so stupid to have duplicated
that code twice instead of just having blkdev_open() call blkdev_get().

Thanks.

Linus




Re: [reiserfs-list] ReiserFS data corruption in very simple configuration

2001-10-03 Thread Toby Dickenson

Of course. If you want data to hit the disk, you have to use fsync. This
does work with reiserfs and will ensure that the data hits the disk. If
you don't do this then bad things might happen.

This is probably a naive question, but this thread has already proved
me wrong on one naive assumption.

If the sequence is:
1. append some data to file A
2. fsync(A)
3. append some further data to A
4. some writes to other files
5. power loss

Is it guaranteed that all the data written in step 1 will still be
intact?

The potential problem I can see is that some data from step 1 may have
been written in a tail, the tail moves during step 3, and then the
original tail is overwritten before the new tail (including data from
before the fsync) is safely on disk.

Thanks for your help,


Toby Dickenson
[EMAIL PROTECTED]