From d6c5a1280e19fec79f2ffcc740143e755cb627ca Mon Sep 17 00:00:00 2001 From: Evgeniy Ivanov Date: Sun, 8 Jan 2012 23:52:57 +0400 Subject: [PATCH] Convert s_block_size on MFSv3. On MFSv3 s_block_size is stored on disk, hence bytes should be converted on big endian. --- servers/mfs/super.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/servers/mfs/super.c b/servers/mfs/super.c index a55133d33..24aa854fd 100644 --- a/servers/mfs/super.c +++ b/servers/mfs/super.c @@ -279,8 +279,12 @@ PUBLIC int read_super(struct super_block *sp) sp->s_ndzones = V1_NR_DZONES; sp->s_nindirs = V1_INDIRECTS; } else { - if (version == V2) + if (version == V2) { sp->s_block_size = _STATIC_BLOCK_SIZE; + } else { + sp->s_block_size = (unsigned short) + conv2(native,(int) sp->s_block_size); + } if (sp->s_block_size < _MIN_BLOCK_SIZE) { return EINVAL; }