public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Brian F. G. Bidulock" <bidulock@openss7.org>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC]  Slimming down struct inode
Date: Wed, 14 Jun 2006 18:16:27 -0600	[thread overview]
Message-ID: <20060614181627.B28144@openss7.org> (raw)
In-Reply-To: <E1Foqjw-00010e-Ln@candygram.thunk.org>; from tytso@mit.edu on Fri, Jun 09, 2006 at 07:50:08PM -0400

Theodore,

On Fri, 09 Jun 2006, Theodore Ts'o wrote:
> 1) Move i_blksize (optimal size for I/O, reported by the stat system
>    call).  Is there any reason why this needs to be per-inode, instead
>    of per-filesystem?
> 
> 2) Move i_blkbits (blocksize for doing direct I/O in bits) to struct
>    super.  Again, why is this per-inode?

Have you considered NFS?

> 3) Move i_pipe, i_bdev, and i_cdev into a union.  An inode cannot
>     simultaneously be a pipe, block device, and character device at the
>     same time.

A STREAMS-based FIFO is both a (named) pipe and a character device at the
same time.  I would prefer if you did not merge i_pipe with i_cdev for this
reason.  In the current GPL'ed out of tree STREAMS implementation, i_pipe
is used to point to the Stream head (as the normal v_str pointer in the UNIX
vnode).  STREAMS-based FIFOs are the only instance in STREAMS where it
ventures outside its own filesystem (specfs) and adjusts inodes from other
filesystems.  This is also true for Linux native FIFOs (named pipes) that
use the i_pipe pointer in the filesystem in which they are named instead of
creating inodes within the pipefs.

I suppose that the other two permutations are correct:

  - a block device inode cannot also be a character device inode
  - a block device inode cannot also be a pipe

so at least i_cdev and i_bdev could be merged, however, you will need some
way to determine which actual object was attached to the union to allow the
object reference to be dropped when the inode is cleaned.  It might be better
to leave that one alone too, as any flag or mode that might be used could get
munged by a filesystem during the inode lifecycle causing incorrect reference
counts, or worse, an attempt to free the object against the wrong cache.

No comment on the rest.


  parent reply	other threads:[~2006-06-15  0:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-09 23:50 [RFC] Slimming down struct inode Theodore Ts'o
2006-06-10  0:24 ` Bernd Eckenfels
2006-06-10  1:27 ` Al Viro
2006-06-10  1:56   ` Theodore Tso
2006-06-10  6:24     ` Stefan Richter
2006-06-10 10:48 ` Jan Engelhardt
2006-06-10 15:04   ` Jeff Garzik
2006-06-13  4:35     ` Nathan Scott
2006-06-13  4:32   ` Nathan Scott
2006-06-13 14:00     ` Avi Kivity
2006-06-13 17:44       ` Theodore Tso
2006-06-13 18:08         ` Avi Kivity
2006-06-13 20:10           ` Jan Engelhardt
2006-06-13 20:25             ` Avi Kivity
2006-06-13 22:41       ` Nathan Scott
2006-06-14 10:29         ` Nikita Danilov
2006-06-14 21:50           ` Nathan Scott
2006-06-15  5:49             ` Theodore Tso
2006-06-15  7:01               ` Nathan Scott
2006-06-15  8:46                 ` Brian F. G. Bidulock
2006-06-15 10:20                   ` Nathan Scott
2006-06-14 23:27           ` Jan Engelhardt
2006-06-15 10:09             ` Nikita Danilov
2006-06-10 11:03 ` Tomasz Torcz
2006-06-10 15:06   ` Jeff Garzik
2006-06-15  0:16 ` Brian F. G. Bidulock [this message]
2006-06-15  4:43   ` Theodore Tso
2006-06-15  8:27     ` Brian F. G. Bidulock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060614181627.B28144@openss7.org \
    --to=bidulock@openss7.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox