On Wed, 15 Nov 2006, Phillip Susi wrote:
> No, you can not tamper with the underlying data while the kernel has it
> mounted.
>
> Yakov Lerner wrote:
>> I'd like to make read-write test of the raw disk, and disk has
>> mounted partitions. Is it possible to lock range of sectors
>> of the raw device so that any kernel code that wants to write
>> to this range will sleep ? (so that test
>> { lock range; read /dev/hda->buf; write buf->/dev/hda; unlock }
>> won't corrupt the filesysyem ?)
>>
>> Thanks
>> Yakov
>
Well certainly if the low-level driver was modified, or a new one
created, so that one could lock/unlock a range of sectors, then that
would be possible. You would need to save (somewhere) the original
sector data, then put it back before unlocking that range. You couldn't
save the original data in a file on the disk, because that file-data
may (someday) extend into the locked region and you have a deadlock.
In the "good old days" when a SCSI format block command actually
worked, we could repair bad sectors by doing just that. We would
lock the block, save whatever data was readable in that block,
format that block, write the data back, then release the lock.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5592.72 BogoMips).
New book: http://www.AbominableFirebug.com/
_
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]