public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefani Seibold <stefani@seibold.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] cramfs: generate unique inode number for better inode cache usage
Date: Tue, 14 Dec 2010 22:24:38 +0100	[thread overview]
Message-ID: <1292361878.29621.10.camel@wall-e> (raw)
In-Reply-To: <AANLkTinPkGHASWubtUY1aDbnxv8V3uGvV+b+e+TkSiVS@mail.gmail.com>

Am Dienstag, den 14.12.2010, 13:08 -0800 schrieb Linus Torvalds:
> On Tue, Dec 14, 2010 at 12:51 PM, Andrew Morton
> <akpm@linux-foundation.org> wrote:
> >
> > Did you look at using iunique() to generate cramfs inode numbers?
> 
> That breaks the cramfs "hardlinking" (which is just files that have
> the same data pointer), and now a hardlinked file wouldn't have the
> same inode number any more.
> 
> Of course, I'm not sure the hardlinking really matters. cramfs
> hardlinks aren't really traditional hardlinks anyway - since the
> permissions etc are in the directory entry, you can have the data
> hardlinked without having the same permissions, so it's not a "real"
> hardlink even if the inode number were to be the same.
> 

In my opinion hardlinks doesn't matter, because cramfs has no real
hardlinks.

> But this patch seems to roughly approximate the old pseudo-hardlink
> behavior. It used to be that all non-data files showed up with the
> same inode number, now they have separate inode numbers.
> 
> That said, I hate how it moves that "setup_inode" helper function
> inline and then does the "if it's a character device" kinds of tests
> twice. Once for the inode number logic, and once for the inode
> operations structure assignment.
> 
> So I think the approach is fine, but I think the implementation is pretty ugly.
> 

Okay, i will see if i find a better solution. The problem is that the
inode number generation CRAMINO will be called from two different
functions, get_cramfs_inode() and cramfs_readdir(). So it is much more
readable to have one function which creates the inode than an two
optimized implementations.

Stefani



  reply	other threads:[~2010-12-14 21:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-12 10:48 [PATCH] cramfs: generate unique inode number for better inode cache usage stefani
2010-12-14 20:51 ` Andrew Morton
2010-12-14 21:02   ` Stefani Seibold
2010-12-14 21:12     ` Andrew Morton
2010-12-14 21:27       ` Stefani Seibold
2010-12-14 21:08   ` Linus Torvalds
2010-12-14 21:24     ` Stefani Seibold [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-12-14 23:12 stefani
2010-12-14 23:32 ` Linus Torvalds
2010-12-14 23:43   ` Linus Torvalds
2010-12-15  7:50     ` Stefani Seibold
2010-12-15  8:15       ` Pekka Enberg
2010-12-15 15:51         ` Linus Torvalds
2010-12-15 16:31           ` stefani
2010-12-15 16:45             ` Linus Torvalds
2010-12-16  9:47               ` Stefani Seibold
2010-12-16  9:52 stefani
2010-12-16 11:45 ` Pekka Enberg
2010-12-16 16:40 stefani

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=1292361878.29621.10.camel@wall-e \
    --to=stefani@seibold.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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