mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Phillip Lougher <phillip@lougher.demon.co.uk>
To: Dave Johnson <djohnson+linux-kernel@sw.starentnetworks.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fix cramfs making duplicate entries in inode cache
Date: Fri, 19 Aug 2005 22:25:26 +0100	[thread overview]
Message-ID: <43064E46.3040706@lougher.demon.co.uk> (raw)
In-Reply-To: <17158.15932.939201.786982@cortez.sw.starentnetworks.com>

Dave Johnson wrote:

> 
> Patch below fixes this by making get_cramfs_inode() use the inode
> cache before blindly creating a new entry every time.  This eliminates
> the duplicate inodes and duplicate buffer cache.
> 
 > +	struct inode * inode = iget_locked(sb, CRAMINO(cramfs_inode));

Doesn't iget_locked() assume inode numbers are unique?

In Cramfs inode numbers are set to 1 for non-data inodes (fifos, 
sockets, devices, empty directories), i.e

%stat device namedpipe
   File: `device'
   Size: 0               Blocks: 0          IO Block: 4096   character 
special file
Device: 700h/1792d      Inode: 1           Links: 1     Device type: 1,1
Access: (0644/crw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1970-01-01 01:00:00.000000000 +0100
Modify: 1970-01-01 01:00:00.000000000 +0100
Change: 1970-01-01 01:00:00.000000000 +0100
   File: `namedpipe'
   Size: 0               Blocks: 0          IO Block: 4096   fifo
Device: 700h/1792d      Inode: 1           Links: 1
Access: (0644/prw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1970-01-01 01:00:00.000000000 +0100
Modify: 1970-01-01 01:00:00.000000000 +0100
Change: 1970-01-01 01:00:00.000000000 +0100

Should iget5_locked() be used here?

Phillip

  reply	other threads:[~2005-08-19 21:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-19 20:17 Dave Johnson
2005-08-19 21:25 ` Phillip Lougher [this message]
2005-08-19 23:17   ` Dave Johnson
2005-08-20  2:14     ` Dave Johnson

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=43064E46.3040706@lougher.demon.co.uk \
    --to=phillip@lougher.demon.co.uk \
    --cc=djohnson+linux-kernel@sw.starentnetworks.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®