• 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: What, besides open files, can keep a volume busy?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What, besides open files, can keep a volume busy?


  • Subject: Re: What, besides open files, can keep a volume busy?
  • From: Quinn <email@hidden>
  • Date: Mon, 23 Oct 2006 18:51:36 +0100

At 10:28 -0700 23/10/06, Rick Mann wrote:
Would the open file show up in the VFS data structures?

Well, yes, by definition.

The problem is that "lsof" traces file descriptors from the process down. So it iterates the process list, then iterates the descriptor table within each process that it finds, then works out what those descriptors are.

<x-man-page://2/unmount> works in a completely different way [1]. VFS knows which vnodes are associated with which mount points. When you try to unmount a volume, VFS iterates that list reclaiming each vnode (that is, detaching it from the underlying file system node). If this fails, the unmount fails. It typically fails because one of the vnodes has a long term ("use count") reference. A vnode gets a use count reference whenever it's attached to a new descriptor, but it can also get one in other ways (like the file being opened by kernel code).

S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

[1] The following is a gross simplification; my apologies to the VFS experts out there.
_______________________________________________
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
References: 
 >What, besides open files, can keep a volume busy? (From: Rick Mann <email@hidden>)
 >Re: What, besides open files, can keep a volume busy? (From: Quinn <email@hidden>)
 >Re: What, besides open files, can keep a volume busy? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: What, besides open files, can keep a volume busy?
  • Next by Date: mbuf corruption tracking advice
  • Previous by thread: Re: What, besides open files, can keep a volume busy?
  • Next by thread: Re: What, besides open files, can keep a volume busy?
  • Index(es):
    • Date
    • Thread