Re: Doing file io from kernel IOKit driver context, again.
Re: Doing file io from kernel IOKit driver context, again.
- Subject: Re: Doing file io from kernel IOKit driver context, again.
- From: Michael Smith <email@hidden>
- Date: Thu, 10 Jun 2010 08:50:46 -0700
On Jun 9, 2010, at 7:20 PM, Chris Suter wrote: On Thu, Jun 10, 2010 at 11:49 AM, Michael Smith < email@hidden> wrote: These filesystems will reject F_LOG2PHYS, which is generally a good safety
net.
I've come to this thread late, but unless I'm mistaken F_LOG2PHYS is practically useless; it doesn't give you the length of the extent. In any case, it sounds horrendous. There'd be nothing stopping the filesystem from moving your file after you'd got the result back.
A filesystem that honours F_LOG2PHYS need to guarantee that for the lifetime of the descriptor, the translation remains valid. This obviously doesn't hold for lots of filesystems, but that's OK; they can just return an error and tell you that you can't assume that file-logical corresponds to bdev-logical. The best approach is to farm out all I/O requests via a user process. I believe this is what usually happens for Apple's disk images (although it is also possible to have purely in-kernel handling).
"Best" is a subjective term. It's certainly an approach with lots of advantages.
= Mike
-- True terror is to wake up one morning and discover that your high school class is running the country. -- Kurt Vonnegut
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden