From: Juergen Hasch <lkml@elbonia.de>
To: Andreas Dilger <adilger@clusterfs.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Michael Welles <mike@bangstate.com>,
linux-kernel@vger.kernel.org
Subject: Re: Using get_cwd inside a module.
Date: Sun, 23 Nov 2003 20:41:58 +0100 [thread overview]
Message-ID: <200311232041.58397.lkml@elbonia.de> (raw)
In-Reply-To: <20031122044833.R20568@schatzie.adilger.int>
Am Samstag, 22. November 2003 12:48 schrieb Andreas Dilger:
> On Nov 22, 2003 10:15 +0000, Christoph Hellwig wrote:
> > On Sat, Nov 22, 2003 at 10:33:34AM +0100, Juergen Hasch wrote:
> > > Dnotify doesn't return the file names that changed, changedfiles does.
> > > I've looked into this, because Samba would benefit from such a
> > > functionality.
> > >
> > > So maybe it would be possible to teach dnotify to return file names
> > > (e.g. using netlink) ?
> >
> > Well, you can't return filenames. There's no unique path to a give
> > file.
>
> Since the caller is already watching a specific directory, it doesn't
> need to know the full pathname, just the inode number that changed.
> Then Samba et. al. could do an inode->name(s) lookup on the directory.
As the kernel would need to communicate with userspace anyway, I believe
getting the file name directly from the kernel shouldn't be too much to
ask for. The kernel already knows it and we save the lookup operation in
userspace that is needed each time we receive an event.
However getting inode and event type would still be a huge improvement,
because right now we have to stat all files in a directory and compare
it with a stored version, to find out what happend.
...Juergen
next prev parent reply other threads:[~2003-11-23 19:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-22 0:05 Michael Welles
2003-11-22 0:32 ` Maciej Zenczykowski
2003-11-22 12:30 ` Szymon Acedański
2003-11-22 8:30 ` Christoph Hellwig
2003-11-22 9:33 ` Juergen Hasch
2003-11-22 10:15 ` Christoph Hellwig
2003-11-22 10:45 ` Juergen Hasch
2003-11-22 11:04 ` Christoph Hellwig
2003-11-22 17:22 ` Michael Welles
2003-11-23 19:40 ` Juergen Hasch
2003-11-22 11:48 ` Andreas Dilger
2003-11-23 19:41 ` Juergen Hasch [this message]
2003-11-22 17:15 ` Michael Welles
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200311232041.58397.lkml@elbonia.de \
--to=lkml@elbonia.de \
--cc=adilger@clusterfs.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike@bangstate.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®