patch-2.4.25 linux-2.4.25/fs/hfs/super.c
Next file: linux-2.4.25/fs/inode.c
Previous file: linux-2.4.25/fs/fat/misc.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
2004-02-18 05:36:31.000000000 -0800
- Orig file:
linux-2.4.24/fs/hfs/super.c
- Orig date:
2003-08-25 04:44:43.000000000 -0700
diff -urN linux-2.4.24/fs/hfs/super.c linux-2.4.25/fs/hfs/super.c
@@ -395,6 +395,7 @@
struct hfs_mdb *mdb;
struct hfs_cat_key key;
kdev_t dev = s->s_dev;
+ int dev_blocksize;
hfs_s32 part_size, part_start;
struct inode *root_inode;
int part;
@@ -406,7 +407,12 @@
}
/* set the device driver to 512-byte blocks */
- set_blocksize(dev, HFS_SECTOR_SIZE);
+ if (set_blocksize(dev, HFS_SECTOR_SIZE) < 0) {
+ dev_blocksize = get_hardsect_size(dev);
+ hfs_warn("hfs_fs: unsupported device block size: %d\n",
+ dev_blocksize);
+ goto bail3;
+ }
s->s_blocksize_bits = HFS_SECTOR_SIZE_BITS;
s->s_blocksize = HFS_SECTOR_SIZE;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)