Re: fcntl() equivelent for kFSForceReadMask?
Re: fcntl() equivelent for kFSForceReadMask?
- Subject: Re: fcntl() equivelent for kFSForceReadMask?
- From: James Bucanek <email@hidden>
- Date: Mon, 29 Oct 2012 09:12:32 -0700
Quinn "The Eskimo!" <mailto:email@hidden> wrote (Monday,
October 22, 2012 3:58 AM +0100):
On 19 Oct 2012, at 20:51, James Bucanek <email@hidden> wrote:
Is there any way to emulate it?
You might be able to make some progress using <x-man-page://2/madvise>. You
can use <x-man-page://2/mincore> to see whether things are working as
expected.
Quinn,
I'm not sure how I would apply madvise() to the data of an open
file. It appears to only deal with memory addresses and VM swap management.
What I'd like to be able to do is, after reading what I suspect
is corrupted data, request a physical re-read of the data from
the device. I can't locate any commands to fcntl() that would,
for example, force the previously buffered data blocks for a
file to be discarded, or to request the device re-read the data
from the physical media.
I have to stress that madvise() is, as the name suggest, advisory. You're
looking for something definitive, and I don't think we have anything to
support that.
I'm only looking for a "best effort" service. I'm sure there are
many logical block devices that wouldn't support this (networked
volumes) and for which "physical media" doesn't even make any
sense (ram disk).
James
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden