lkml.org 
[lkml]   [1999]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Open directory as default file - proposal for API
Alexander Viro wrote:
> > Use the same attributes for the "default" file as the directory itself.
> > So really you've opened the directory inode, it's just that reading &
> > writing work on the associated file.
>
> Parse it, please. What dentry you will get?

Two options:

1. The dentry of the default file.
A flag is set on the filp.
Most operations act on the default file's dentry, but readdir and
lseek check the filp flag to consider acting on the default file
dentry's _parent_.

For this reason, the default file may not be a symbolic link.

2. The filp has two dentries.
Most operations use the usual one, but readdir uses the other, and
lseek knows to operate on both if they are different.

Has no limitation w.r.t. symbolic links, but uses a bit more space in
filps.

Hey, this is too easy :-)

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.064 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site