Skip to contentSkip to conversation

kdevt-diff

PATCH [email protected] 5 participants 7 messages Apr 14, 2003 – Apr 16, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

Do all devices smaller than 16:16 appear the same on all filesystems, limited or not?

Yes.

#1 lore raw
Quoted 4 lines · On Tue, Apr 15, 2003 at 12:01:09AM +0200, [email protected] wrote:
Quoted 2 lines

Do all devices smaller than 16:16 appear the same on all filesystems, limited or not?

Yes.

I meant "is that the behavior we want to choose?" I understand
that this would be the result of your current scheme.
I guess I'm wondering what made you choose "consistency across
legacy filesystems" over "consistency across our expanded device space".

Joel

Signature · 9 lines
Life's Little Instruction Book #444

	"Never underestimate the power of a kind word or deed."

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: [email protected]
Phone: (650) 506-8127
#2 lore raw
Quoted 2 lines · Joel Becker

I guess I'm wondering what made you choose "consistency across
legacy filesystems" over "consistency across our expanded device space".

I'm going to take a wild stab in the dark and say that being able to boot using the /dev on an iso9660 CD is a requirement for most distros?

#3 lore raw
Quoted 6 lines · On Mon, Apr 14, 2003 at 06:18:20PM -0400, [email protected] wrote:
Quoted 2 lines · Joel Becker

I guess I'm wondering what made you choose "consistency across
legacy filesystems" over "consistency across our expanded device space".

I'm going to take a wild stab in the dark and say that being able to boot using the /dev on an iso9660 CD is a requirement for most distros?

Um, most distros mount a ramdisk. Also, the number of devices
needed for a boot surely fit in the 8:8 legacy space? I'm willing to hear dissent, I just wanted to know the rationale.

Joel

Signature · 9 lines
"The opposite of a correct statement is a false statement. The
 opposite of a profound truth may well be another profound truth."
         - Niels Bohr 

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: [email protected]
Phone: (650) 506-8127
#4 lore raw
In reply to [email protected]
Followup to:  <[email protected]>
By author:    [email protected]
In newsgroup: linux.dev.kernel
Quoted 4 lines

--==_Exmh_-1812532000P
Content-Type: text/plain; charset=us-ascii

Quoted 8 lines
Quoted 2 lines · Joel Becker

I guess I'm wondering what made you choose "consistency across
legacy filesystems" over "consistency across our expanded device space".

I'm going to take a wild stab in the dark and say that being able to boot using the /dev on an iso9660 CD is a requirement for most distros?

Not really, but it's certainly a nice capability. However, iso9660 (RockRidge, actually) has 64 bits of dev_t space; it's actually split into two 32-bit entries specified as "high 32 bits" and "low 32 bits."

I'm not positive if Linux expects those to contain major:minor or 0:<16-bit-dev_t>.

-hpa

Signature · 3 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
#5 lore raw
Quoted 6 lines · H. Peter Anvin

Not really, but it's certainly a nice capability. However, iso9660 (RockRidge, actually) has 64 bits of dev_t space; it's actually split into two 32-bit entries specified as "high 32 bits" and "low 32 bits."

I'm not positive if Linux expects those to contain major:minor or 0:<16-bit-dev_t>.

      case SIG('P','N'):
        { int high, low;
          high = isonum_733(rr->u.PN.dev_high);
          low = isonum_733(rr->u.PN.dev_low);
          /*
           * The Rock Ridge standard specifies that if sizeof(dev_t) <= 4,
           * then the high field is unused, and the device number is completely
           * stored in the low field.  Some writers may ignore this subtlety,
           * and as a result we test to see if the entire device number is
           * stored in the low field, and use that.
           */
          if((low & ~0xff) && high == 0) {
            inode->i_rdev = mk_kdev(low >> 8, low & 0xff);
          } else {
            inode->i_rdev = mk_kdev(high, low);
          }
        }
        break;

(Here isonum_733 gets 32 bits.)

#6 lore raw
Quoted 29 lines · Andries Brouwer
Quoted 6 lines · H. Peter Anvin

Not really, but it's certainly a nice capability. However, iso9660 (RockRidge, actually) has 64 bits of dev_t space; it's actually split into two 32-bit entries specified as "high 32 bits" and "low 32 bits."

I'm not positive if Linux expects those to contain major:minor or 0:<16-bit-dev_t>.

      case SIG('P','N'):
        { int high, low;
          high = isonum_733(rr->u.PN.dev_high);
          low = isonum_733(rr->u.PN.dev_low);
          /*
           * The Rock Ridge standard specifies that if sizeof(dev_t) <= 4,
           * then the high field is unused, and the device number is completely
           * stored in the low field.  Some writers may ignore this subtlety,
           * and as a result we test to see if the entire device number is
           * stored in the low field, and use that.
           */
          if((low & ~0xff) && high == 0) {
            inode->i_rdev = mk_kdev(low >> 8, low & 0xff);
          } else {
            inode->i_rdev = mk_kdev(high, low);
          }
        }
        break;
Quoted 1 line

(Here isonum_733 gets 32 bits.)

OK, in other words, it accepts either format, either:

0x000000000000MMmm or 0x000000MM000000mm

This is perfectly consistent with what dev_t does for a 32:32 split; the previous form would be the "backwards compatibility" format and the second the "new" format.

-hpa