per file lock list
From: Igor Shmukler (igor.shmukler_at_gmail.com)
Date: 07/21/05
- Previous message: alexander: "Re: Help debugging mysterious freezing (5.4)"
- Next in thread: Matthew Dillon: "Re: per file lock list"
- Reply: Matthew Dillon: "Re: per file lock list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 21 Jul 2005 15:10:30 -0400 To: fs@freebsd.org, hackers@freebsd.org, dillon@apollo.backplane.com
Hi,
We have a question: how to get all POSIX locks for a given file?
As far as I know, existing API does not allow to retrieve all file
locks. Therefore, we need to use kernel internal structures to get all
applied locks. Unfortunately, a head of list with file locks is
attached to inode rather then vnode. As result, it is much harder to
get the lock list head due to the need to know exact inode type that
is hidden behind the vnode.
Of course, the problem could be resolved in a hackish way: we may get
the address of VOP_ADVLOCK() method and compare it with all known FS
methods, that handles this VOP operation: (ufs_advlock, etc.) and
therefore apply a proper type cast to vnode->v_data to get valid
inode. However, this would be a last resort.
So the question: is there an elegant way to get the lock list for a given file?
Thank you in advance.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: alexander: "Re: Help debugging mysterious freezing (5.4)"
- Next in thread: Matthew Dillon: "Re: per file lock list"
- Reply: Matthew Dillon: "Re: per file lock list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|