• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to read files from disk directly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to read files from disk directly?


  • Subject: Re: How to read files from disk directly?
  • From: Ken Hornstein <email@hidden>
  • Date: Sun, 03 Jul 2011 23:49:53 -0400

>But, if I am using public APIs to obtain the information, I would assume
>it would remain somewhat stable. I would assume that defragmentation
>applications have to do something similar to this and they seem to
>remain somewhat stable, but perhaps I am mistaken.

Well, from a _quick_ glance at the xnu source, the only API I could
find which does that is F_LOG2PHYS.  And as for defragmentation ...
do people still _do_ that anymore?  HFS Plus will auto-defrag files
under 20 MB and the whole point to extents were to cut down on
fragmentation.  I see there are still some defragmentation utilities,
but I would guess that they simply access the disk directly and
have to know about the HFS Plus volume format.

>Nice. I was not aware of the F_LOG2PHYS option of fcntl. What are the
>other system calls that would get me all of the physical block offsets?
>Or is that what you describe below?

I think that's it, unless you directly access the disk device and
read the catalog, which is what fsck_hfs does (again, from a super-quick
glance).

--Ken
 _______________________________________________
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

References: 
 >Re: How to read files from disk directly? (From: Eric Gorr <email@hidden>)

  • Prev by Date: Re: How to read files from disk directly?
  • Next by Date: Re: How to read files from disk directly?
  • Previous by thread: Re: How to read files from disk directly?
  • Next by thread: Re: How to read files from disk directly?
  • Index(es):
    • Date
    • Thread