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


    On Mon, 28 Jun 1999, Jamie Lokier wrote:

    > 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_.

    lseek doesn't act on dentries at all - it lives on struct file layer.
    readdir requires a lock on inode in question for damn good reasons.
    You'll get races that way.

    > 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.
    Ditto. Locking is not going to be fun that way.

    > Hey, this is too easy :-)

    Ahem... And what about ->create()/->unlink()/.... stuff? What about
    renaming an open file?


    -
    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:3.881 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site