Re: [patch 1/2] VFS: new fgetattr() file operation

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <hch@...>
Cc: <miklos@...>, <hch@...>, <matthew@...>, <trond.myklebust@...>, <adilger@...>, <linux-kernel@...>, <linux-fsdevel@...>
Date: Monday, September 24, 2007 - 9:38 am

> On Mon, Sep 24, 2007 at 03:18:10PM +0200, Miklos Szeredi wrote:

And my patch is not working around a problem, rather solving a problem
in a correct way.

Let me summarise it:

There are valid reasons we have fstat() in addition to stat/lstat.
For example we want to protect agains races involving unlink/rename on
an open file.

Say I want to implement a network filesystem with a pure unprivileged
userspace sever (this is basically what sshfs does).

I want my filesystem client implementation to keep all these
advantages of fstat().  So how can I do that?  There's a simple way:
implement this operation with fstat() on the server.  I get all the
advantages on the remote system automatically.

But for that the filesystem needs to have the open file that the
fstat() on the client was performed on.

It's that simple.  There's really no ugly hacks going on behind the
scenes.  It's just that we do want to delegate some properties of this
operation onto the server, and the simplest and best implementation is
to just let the filesystem have the information it needs.

Why is that such a big problem?

Miklos
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 1/2] VFS: new fgetattr() file operation, Miklos Szeredi, (Mon Sep 24, 8:24 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Christoph Hellwig, (Mon Sep 24, 8:36 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Miklos Szeredi, (Mon Sep 24, 8:48 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Miklos Szeredi, (Mon Sep 24, 9:40 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Matthew Wilcox, (Mon Sep 24, 8:59 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Miklos Szeredi, (Mon Sep 24, 9:06 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Matthew Wilcox, (Mon Sep 24, 9:16 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Miklos Szeredi, (Mon Sep 24, 9:21 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Christoph Hellwig, (Mon Sep 24, 9:10 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Miklos Szeredi, (Mon Sep 24, 9:18 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Christoph Hellwig, (Mon Sep 24, 9:27 am)
Re: [patch 1/2] VFS: new fgetattr() file operation, Miklos Szeredi, (Mon Sep 24, 9:38 am)
Re: [patch 2/2] VFS: allow filesystem to override mknod capa..., Christoph Hellwig, (Mon Sep 24, 8:38 am)