[Ocfs2-test-devel] [PATCH 1/1] Ocfs2-test: Add destructive testcase for reflink_test v1.
Tristan
tristan.ye at oracle.com
Tue Nov 3 17:26:53 PST 2009
Sunil Mushran wrote:
> Tristan wrote:
>> Not quite sure if I get what you mean exactly, I think comparing the
>> timestamp in header with the latest one in logfile is enough to
>> ensure if the last write hit the disk. why to compare the header with
>> trailor, it should be the same since we only reboot the machine after
>> a successful write, and each will guarantee the header do is the same
>> as trailor.
>
> The reason we want to compare the header with the trailer is to look
> for fractured chunks. Remember the io that the user submits goes thru
> many layers in the kernel and then to the storage. If the IO to the chunk
> gets broken down into per block, then a well timed machine reset could
> result in an inconsistent chunk (fractured).
I knew what you meant, but I think my test probably don't need to do
this, the verification step of comparing log_readed pattern with
file_readed pattern is suffice to expose the fractured the chunks.
here the pattern I meant is chunk generated from log or read from file
is one chunk in memory.
The log_readed pattern is generated from a log record, which has
definitely the same header and trailer, so if the corresponding pattern
in file didn't have a same header and trailer, it can be easily revealed
by a simple comparison.
Tristan.
>
> This is one reason why we ask users to use a clustersize of atleast the
> oracle db blocksize as that ensures that each oracle block is contiguous
> on disk, which allows the io stack in linux to keep the ios to it whole
> (and not break it up into smaller blocks).
More information about the Ocfs2-test-devel
mailing list