[Ocfs2-devel] [PATCH] Treat writes as new when holes span across page boundaries

Goldwyn Rodrigues rgoldwyn at gmail.com
Wed Feb 23 14:31:25 PST 2011


Hi Joel,

On Wed, Feb 23, 2011 at 3:44 PM, Joel Becker <jlbec at evilplan.org> wrote:
> On Wed, Feb 23, 2011 at 01:37:31PM -0800, Joel Becker wrote:
>> On Wed, Feb 23, 2011 at 03:35:36PM -0600, Goldwyn Rodrigues wrote:
>> > On Wed, Feb 23, 2011 at 3:17 PM, Joel Becker <jlbec at evilplan.org> wrote:
>> > >> 2.  the previous write ended in a page boundary, but not a cluster
>> > >> boundary. eg, clustersize=16K but pos is at the page boundary = 4k
>> > >
>> > >        Must it be a page boundary?  What about a block boundary? ;-)
>> >
>> > I am not sure of this, but I would like to stick with page boundary. I
>> > am too poor to afford a machine with a page size bigger than 4k to
>> > test this ;)
>>
>>       Create a filesystem with 1K blocks and 16K clusters.  Now you
>> have four blocks per page, and you can test block vs page boundaries.

Proved, it is page boundary.

>
>        I would love to see you modify tailtest to expose this bug.  You
> should be able to do it with one set of writes (your write(4k),
> write(32b), write(4K at someplace past 4K+32b)) test).  It will be a lot
> easier to debug if it is a simple script rather than a bunch of C
> writes.
>

Here is a simple script. I will incorporate later into tailtest later.

FILENAME=/mnt/f2

for i in `seq 0 256`; do
	let s=$i*4096
	echo "a" | dd of=$FILENAME count=1 bs=1 seek=$s conv=notrunc 2>/dev/null
	let t=$s+4095
	echo "b" | dd of=$FILENAME count=1 bs=1 seek=$t conv=notrunc 2>/dev/null
done


-- 
Goldwyn



More information about the Ocfs2-devel mailing list