* File and Directory Change Notification
@ 2003-11-25 14:53 Joseph D. Wagner
2003-11-26 4:15 ` Jamie Lokier
0 siblings, 1 reply; 7+ messages in thread
From: Joseph D. Wagner @ 2003-11-25 14:53 UTC (permalink / raw)
To: linux-fsdevel
The docs are a little sketchy on this one.
Using fcntl(), can you get change notifications on specific files, or just
directories?
TIA.
Joseph D. Wagner
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: File and Directory Change Notification
2003-11-25 14:53 File and Directory Change Notification Joseph D. Wagner
@ 2003-11-26 4:15 ` Jamie Lokier
2003-11-25 16:38 ` Joseph D. Wagner
2003-11-26 12:37 ` Matthew Wilcox
0 siblings, 2 replies; 7+ messages in thread
From: Jamie Lokier @ 2003-11-26 4:15 UTC (permalink / raw)
To: Joseph D. Wagner; +Cc: linux-fsdevel
Joseph D. Wagner wrote:
> The docs are a little sketchy on this one.
>
> Using fcntl(), can you get change notifications on specific files, or just
> directories?
You can use F_NOTIFY to get notifications of all files in a directory
(the whole directory, and only for operations via this path in case of
hard links), and F_SETLEASE to get notifications of other processes
opening a file.
There's no way to be notified of every individual write to a single
file, but that isn't typically useful anyway.
What's missing from leases is the ability to block until the final
close of a file (and block further opens in the meantime), and for
F_RDLCK leases to fail/block when the file is open for writing
(there's a FIXME in the kernel lease code for that, but nobody has
fixed it).
I'm not sure why exclusive leases are always allowed but mandatory
locking isn't by default. They seem to offer similar DOS possibilities.
-- Jamie
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: File and Directory Change Notification
2003-11-26 4:15 ` Jamie Lokier
@ 2003-11-25 16:38 ` Joseph D. Wagner
2003-11-26 4:57 ` Jamie Lokier
2003-11-26 12:37 ` Matthew Wilcox
1 sibling, 1 reply; 7+ messages in thread
From: Joseph D. Wagner @ 2003-11-25 16:38 UTC (permalink / raw)
To: Jamie Lokier; +Cc: linux-fsdevel
On Wednesday, November 26, 2003 10:15 am, Jamie Lokier wrote:
> What's missing from leases is the ability to block until the final
> close of a file (and block further opens in the meantime), and for
> F_RDLCK leases to fail/block when the file is open for writing
> (there's a FIXME in the kernel lease code for that, but nobody has
> fixed it).
Could you direct me to where that fixme is (file and function name)?
Thanks for your clearification.
Joseph D. Wagner
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: File and Directory Change Notification
2003-11-25 16:38 ` Joseph D. Wagner
@ 2003-11-26 4:57 ` Jamie Lokier
2003-11-25 18:01 ` Joseph D. Wagner
0 siblings, 1 reply; 7+ messages in thread
From: Jamie Lokier @ 2003-11-26 4:57 UTC (permalink / raw)
To: Joseph D. Wagner; +Cc: linux-fsdevel
Joseph D. Wagner wrote:
> On Wednesday, November 26, 2003 10:15 am, Jamie Lokier wrote:
> > What's missing from leases is the ability to block until the final
> > close of a file (and block further opens in the meantime), and for
> > F_RDLCK leases to fail/block when the file is open for writing
> > (there's a FIXME in the kernel lease code for that, but nobody has
> > fixed it).
>
> Could you direct me to where that fixme is (file and function name)?
fcntl_setlease in fs/locks.c
-- Jamie
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: File and Directory Change Notification
2003-11-26 4:57 ` Jamie Lokier
@ 2003-11-25 18:01 ` Joseph D. Wagner
2003-11-26 12:38 ` Matthew Wilcox
0 siblings, 1 reply; 7+ messages in thread
From: Joseph D. Wagner @ 2003-11-25 18:01 UTC (permalink / raw)
To: Jamie Lokier; +Cc: linux-fsdevel
On Wednesday, November 26, 2003 10:15 am, Jamie Lokier wrote:
> What's missing from leases is the ability to block until the final
> close of a file (and block further opens in the meantime), and for
> F_RDLCK leases to fail/block when the file is open for writing
> (there's a FIXME in the kernel lease code for that, but nobody has
> fixed it).
Hmm. Hasn't been fixed in 2.6.0-test10 either.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: File and Directory Change Notification
2003-11-25 18:01 ` Joseph D. Wagner
@ 2003-11-26 12:38 ` Matthew Wilcox
0 siblings, 0 replies; 7+ messages in thread
From: Matthew Wilcox @ 2003-11-26 12:38 UTC (permalink / raw)
To: Joseph D. Wagner; +Cc: Jamie Lokier, linux-fsdevel
On Wed, Nov 26, 2003 at 12:01:54AM +0600, Joseph D. Wagner wrote:
> Hmm. Hasn't been fixed in 2.6.0-test10 either.
Your patch is welcome.
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: File and Directory Change Notification
2003-11-26 4:15 ` Jamie Lokier
2003-11-25 16:38 ` Joseph D. Wagner
@ 2003-11-26 12:37 ` Matthew Wilcox
1 sibling, 0 replies; 7+ messages in thread
From: Matthew Wilcox @ 2003-11-26 12:37 UTC (permalink / raw)
To: Jamie Lokier; +Cc: Joseph D. Wagner, linux-fsdevel
On Wed, Nov 26, 2003 at 04:15:48AM +0000, Jamie Lokier wrote:
> I'm not sure why exclusive leases are always allowed but mandatory
> locking isn't by default. They seem to offer similar DOS possibilities.
Exclusive leases will get broken by the kernel if the application doesn't
cooperate by releasing the lease.
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-11-26 12:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-25 14:53 File and Directory Change Notification Joseph D. Wagner
2003-11-26 4:15 ` Jamie Lokier
2003-11-25 16:38 ` Joseph D. Wagner
2003-11-26 4:57 ` Jamie Lokier
2003-11-25 18:01 ` Joseph D. Wagner
2003-11-26 12:38 ` Matthew Wilcox
2003-11-26 12:37 ` Matthew Wilcox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.