NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/42573: DIRBLKSIZ in <ufs/ufs/dir.h> should not beDEV_BSIZE constant



The following reply was made to PR kern/42573; it has been noted by GNATS.

From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost, 
netbsd-bugs%NetBSD.org@localhost,
        tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: kern/42573: DIRBLKSIZ in <ufs/ufs/dir.h> should not beDEV_BSIZE
         constant
Date: Mon, 4 Jan 2010 09:17:06 +0900

 >  > >  But to make everything fit (eg i386 boot code) the byte alignments
 >  > >  cannot change - the label has to remain in bytes 512-1203.
 >  > 
 >  > Does it? What about "LABELSECTOR" in <machine/disklabel.h>?
 >  
 >  LABELSECTOR needs to go.
 
 Hmm, how can you fix sys/kern/subr_disk_mbr.c without it?
 
 >  > Shouldn't sys/arch/i386/stand/mbr/mbr.S be sector size aware?
 >  I think that code is safe - even though it will read rather more data
 >  than expected.
 >  What happens later on is a bigger problem.
 
 The problem is that current bootloader code assume sector size is 512.
 I wonder if we should keep such assumption even on !512byte/sector disks.
 
 >  > >  (I have a USB memory stick with 2k sectors, the 0x55, 0xaa are in
 >  > >  bytes 510 and 511 as usual.)
 >  > 
 >  > Magic should be at MBR_MAGIC_OFFSET defined in <sys/bootblock.h>
 >  > so it doesn't matter of sector size, does it?
 >  
 >  No - NetBSD doesn't have control over the mbr layout.
 >  We have to match what (probably) microsoft does.
 
 Anyway, file a new PR about it. This PR is about DIRBLKSIZ,
 just one of a bunch of !512byte/sector problems.
 ---
 Izumi Tsutsui
 


Home | Main Index | Thread Index | Old Index