Minor patch for 2.1.48 isofs (fixes strange results of `du' etc)

Roderich Schupp (rsch@ExperTeam.de)
Sat, 9 Aug 1997 18:24:08 +0200


--0__=dfgxavdmQnsPeYU4pUVcBnIfP4gDYQfwjqHeBVoCVU6EGNlnJ6fRygf0
Content-type: text/plain; charset=us-ascii

The following minor patch fixes the random sizes that programs
like `du' report when invoked on files on a CD-ROM.
Basically, isofs_read_inode in fs/isofs/inode.c doesn't zero the
i_blksize field of the in-core inode. If the in-core inode structure
that gets passed in has been recycled from a filesystem that supports
i_blocks/i_blksize the previous values will be preserved (and fool
programs that look at the st_blocks filed of struct stat).
On the other hand, if i_blksize is set to zero the stat syscall will
estimate
st_blocks based in i_size.
This glitch has probably been there for a long time, and it's probably
in 2.0.x, too (at least it's present in 2.0.22, haven't checked later
kernels).
Cheers, Roderich

--0__=dfgxavdmQnsPeYU4pUVcBnIfP4gDYQfwjqHeBVoCVU6EGNlnJ6fRygf0
Content-type: application/octet-stream;
name="isofs-inode-patch"
Content-transfer-encoding: base64

LS0tIGxpbnV4L2ZzL2lzb2ZzL2lub2RlLmMufjF+CVN1biBBdWcgIDMgMTc6Mzk6NDcgMTk5Nw0K
KysrIGxpbnV4L2ZzL2lzb2ZzL2lub2RlLmMJVHVlIEF1ZyAgNSAyMDozNzowMSAxOTk3DQpAQCAt
NjEzLDYgKzYxMyw3IEBADQogCWlub2RlLT5pX3VpZCAgaW5vZGUtPmlfc2ItPnUuaXNvZnNfc2Iu
c191aWQ7DQogCWlub2RlLT5pX2dpZCAgaW5vZGUtPmlfc2ItPnUuaXNvZnNfc2Iuc19naWQ7DQog
CWlub2RlLT5pX3NpemUgIGlzb251bV83MzMgKHJhd19pbm9kZS0+c2l6ZSk7DQorCWlub2RlLT5p
X2Jsb2NrcyAgaW5vZGUtPmlfYmxrc2l6ZSAgMDsNCiANCiAJLyogVGhlcmUgYXJlIGRlZmVjdGl2
ZSBkaXNjcyBvdXQgdGhlcmUgLSB3ZSBkbyB0aGlzIHRvIHByb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