xfs
[Top] [All Lists]

Re: Extended attributes: process vs. kernel context (e.g. HSM)

To: "Stephen C. Tweedie" <sct@xxxxxxxxxx>
Subject: Re: Extended attributes: process vs. kernel context (e.g. HSM)
From: "Theodore Ts'o" <tytso@xxxxxxx>
Date: Fri, 15 Nov 2002 17:37:03 -0500
Cc: Andreas Gruenbacher <agruen@xxxxxxx>, Alexander Viro <viro@xxxxxxxxxxxx>, ext2-devel@xxxxxxxxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
In-reply-to: <20021115170730.M4512@redhat.com>
References: <200211100135.26236.agruen@suse.de> <20021110013233.GH9589@think.thunk.org> <200211111334.32074.agruen@suse.de> <20021111210524.GB6032@think.thunk.org> <20021115170730.M4512@redhat.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Fri, Nov 15, 2002 at 05:07:30PM +0000, Stephen C. Tweedie wrote:
> I'd have thought that the likely model for an HSM system is that the
> requesting user process would find the inode marked "not-in-core", and
> would pass the "please make this inode resident" request out to a
> separate process for completion.  Only that external process would
> require access to the HSM metadata, so it's not immediately obvious
> why the initial caller process absolutely has to have access to the
> HSM metadata.

Sure, and if that external process will either have root (or
CAP_SYS_ADMIN) privileges, then we don't need to do anything special.

However, we might need to do something special is if there is a desire
to examine the HSM metadata in kernel space rather than in user space.
After all, the initial interception where the kernel notices that the
inode isn't resident would likely happen in the kernel, since the idea
is for HSM to be transparent to user processes.  So the kernel logic
when opening a file might very well be:

1)  Is the the size of the inode zero?  (If not, perform a normal open.)
2)  The inode is zero; check to see if there is HSM metadata present.  
        (If not, perform a normal open; the user just opened a 
        zero-legnth inode.  Ho hum.)
3) If HSM metadata is present, then this is a non-resident inode.
        Call out to a daemon process to make the inode resident.

In this design, the check to see whether or not HSM metadata is
present or not needs to happen as a privileged call.  So it may very
well be useful to be able to pass a flag to get_xattr to indicating
that privileged access to the trusted.* space should be allowed, since
the it is being done for official kernel business.

                                                - Ted


<Prev in Thread] Current Thread [Next in Thread>