tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
libsa and 4K devices
Hi,
To enable efiboot to work from Apple M1 nvme I had to apply this diff so
that libsa picks up the fs_fshift based FFS_FSBTODB.
Is this correct or does it mean the FS has an incorrect fs_fsbtodb? (and
there's a bug in mkfs somewhere)
Thanks,
Nick
Index: sys/ufs/ffs/fs.h
===================================================================
RCS file: /cvsroot/src/sys/ufs/ffs/fs.h,v
retrieving revision 1.69
diff -u -p -r1.69 fs.h
--- sys/ufs/ffs/fs.h 18 Sep 2021 03:05:20 -0000 1.69
+++ sys/ufs/ffs/fs.h 22 Apr 2022 08:16:04 -0000
@@ -616,7 +616,7 @@ struct ocg {
* Turn file system block numbers into disk block addresses.
* This maps file system blocks to device size blocks.
*/
-#if defined (_KERNEL)
+#if defined (_KERNEL) || defined(_STANDALONE)
#define FFS_FSBTODB(fs, b) ((b) << ((fs)->fs_fshift - DEV_BSHIFT))
#define FFS_DBTOFSB(fs, b) ((b) >> ((fs)->fs_fshift - DEV_BSHIFT))
#else
Home |
Main Index |
Thread Index |
Old Index