diff options
author | Ralf Kirchner <ralf.kirchner@embedded-brains.de> | 2013-10-18 12:08:00 -0400 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2013-10-18 12:08:00 -0400 |
commit | e89ed924950456fde27ef75b77af20147188b896 (patch) | |
tree | 50c65687ae6ab441b005ad0006236c02d4fa6831 /cpukit/libfs/src/dosfs | |
parent | fsdosfsformat01: Add test for re-mount of a filesystem (diff) | |
download | rtems-e89ed924950456fde27ef75b77af20147188b896.tar.bz2 |
dosfs: Ensure initially the sector size is used as bdbuf block size
Diffstat (limited to 'cpukit/libfs/src/dosfs')
-rw-r--r-- | cpukit/libfs/src/dosfs/fat.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/libfs/src/dosfs/fat.c b/cpukit/libfs/src/dosfs/fat.c index f81bc7b8d7..92e81d3b8b 100644 --- a/cpukit/libfs/src/dosfs/fat.c +++ b/cpukit/libfs/src/dosfs/fat.c @@ -544,6 +544,15 @@ fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; i >>= 1, vol->sec_log2++); + /* Assign the sector size as bdbuf block size for now. + * If possible the bdbuf block size will get increased to the cluster + * size at the end of this method for better performance */ + sc = rtems_bdbuf_set_block_size (vol->dd, vol->bps, true); + if (sc != RTEMS_SUCCESSFUL) + { + close(vol->fd); + rtems_set_errno_and_return_minus_one( EINVAL ); + } vol->bytes_per_block = vol->bps; vol->bytes_per_block_log2 = vol->sec_log2; vol->sectors_per_block = 1; |