lkml.org 
[lkml]   [2006]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: locking sectors of raw disk (raw read-write test of mounted disk)
Yakov Lerner wrote:
> I don't want to tamper wuith data. I want to raw write back exacty
> same raw data that I read in. I only want to make sure that kernel
> doesn't write modified data between in between my read-write pair.

Ahh, in that case you might be able to do this using the device mapper.
You could keep the filesystem mounted on the device mapper with a
mapping to the underlying disk device. Then change that mapping on the
fly to mark a section of the device as mapped to a ramdisk and copy (
while that section is suspended ) the original data there. Then resume
the section, tamper with the underlying disk, then suspend the ramdisk
mapping, copy it back to the underlying disk, then change the mapping
back to normal. You might also use a snapshot dm target instead of a
ramdisk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-11-16 16:29    [W:0.041 / U:2.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site