lkml.org 
[lkml]   [2006]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC] [PATCH 6/8] inode-diet: Move i_cindex from struct inode to struct file
    On Mon, Jun 19, 2006 at 08:37:56PM +0100, Al Viro wrote:
    > > NAK. Please, take it to the union into cdev part.
    >
    > Explanation: the whole point of that sucker is to avoid i_rdev use
    > in drivers, switching to i_cdev + i_cindex. _Especially_ in open().
    > There is a bunch of other drivers that would get cleaner from that,
    > including a lot of tty code.

    The problem is that we already have more stuff in the cdev union
    (list_head's are *big*, especially on Opterons), so moving it there
    doesn't actually save us anything.

    Moving it into struct file however should be good enough clean up the
    character devices drivers that you are concerned about, however. They
    are passed the struct file pointer in the file_operations->open call.
    So we can clean up the tty code, et. al, by using file->f_cindex just
    as easily.

    Furthermore, the inode->i_cindex isn't guaranteed to be valid until
    the high-level vfs open code is called anyway, so you might as well
    tell people to reference it from filp->f_cindex in the device driver's
    open() routine.

    Does that make sense?

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

    \
     
     \ /
      Last update: 2006-06-19 23:00    [W:2.731 / U:0.152 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site