public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Kasper Dupont <kasperd@daimi.au.dk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: isofs hardlink bug (inode numbers different)
Date: Wed, 05 Feb 2003 11:41:42 -0800	[thread overview]
Message-ID: <3E4168F6.4000309@zytor.com> (raw)
In-Reply-To: 3E40F5DC.275FFE9D@daimi.au.dk

Kasper Dupont wrote:
>> 
>>Second: If there are files on the CD-ROM *without* RockRidge
>>attributes, you can get collisions with the synthesized inode numbers
>>for non-RR files.
>  
> That can easily be solved. RockRidge inode numbers are multiplied
> by two, and synthesized inode numbers are all odd. Of course if
> the multiplication overflows a fallback to synthesized inode
> numbers would be necesarry. Does any software produce inode
> numbers large enough to make this a problem?
> 

We have no idea, and we will never be able to know.  They certainly 
*CAN*... they are just anonymous 32-bit values.

> 
>>Third: If you actually rely on inode numbers to be able to find your
>>files, like most versions of Unix including old (but not current)
>>versions of Linux, then they are completely meaningless.
> 
> Agreed.
> 
>>There is another way to generate consistent inodes for hard links,
>>which is to use the data block pointer as the "inode number."  This,
>>however, has the problem that *ALL* zero-lenght files become "hard
>>links" to each other.
> 
> That problem can easily be solved. Simply use different methods
> for zero-length files and all other files. But there might be
> other problems with such an approach:
> 
> 1) Could two different files have same data block pointer?
>    (different sizes perhaps?)

Theoretically yes.

> 2) Do we need a way to find metadata from the inode number?

Currently we do, but we could rewrite the code not to.

	-hpa



  reply	other threads:[~2003-02-05 19:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-26 23:55 isofs hardlink bug (inode numbers different) Volker Kuhlmann
2003-02-04  3:48 ` H. Peter Anvin
2003-02-04 21:28   ` Frank van Maarseveen
2003-02-04 21:52     ` H. Peter Anvin
2003-02-05 11:30   ` Kasper Dupont
2003-02-05 19:41     ` H. Peter Anvin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-10 21:16 James Pearson

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=3E4168F6.4000309@zytor.com \
    --to=hpa@zytor.com \
    --cc=kasperd@daimi.au.dk \
    --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