<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/fat/inode.c, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-11-06T23:41:21Z</updated>
<entry>
<title>fat: -&gt;i_pos race fix</title>
<updated>2008-11-06T23:41:21Z</updated>
<author>
<name>OGAWA Hirofumi</name>
</author>
<published>2008-11-06T20:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ca59f4c3d28df14a1545a1e2832f34a0a50e3ed'/>
<id>urn:sha1:9ca59f4c3d28df14a1545a1e2832f34a0a50e3ed</id>
<content type='text'>
i_pos is 64bits value, hence it's not atomic to update.

Important place is fat_write_inode() only, other places without lock
are just for printk().

This adds lock for "BITS_PER_LONG == 32" kernel.

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fat: mmu_private race fix</title>
<updated>2008-11-06T23:41:21Z</updated>
<author>
<name>OGAWA Hirofumi</name>
</author>
<published>2008-11-06T20:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2bdf67eb1631f30e2f3f5d49e4007c76e88877a8'/>
<id>urn:sha1:2bdf67eb1631f30e2f3f5d49e4007c76e88877a8</id>
<content type='text'>
mmu_private is 64bits value, hence it's not atomic to update.

So, the access rule for mmu_private is we must hold -&gt;i_mutex.  But,
fat_get_block() path doesn't follow the rule on non-allocation path.

This fixes by using i_size instead if non-allocation path.

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fat: Fix _fat_bmap() race</title>
<updated>2008-11-06T23:41:21Z</updated>
<author>
<name>OGAWA Hirofumi</name>
</author>
<published>2008-11-06T20:53:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa93ca18a8b0da4e26bd9491ad144cd14d22f8ec'/>
<id>urn:sha1:fa93ca18a8b0da4e26bd9491ad144cd14d22f8ec</id>
<content type='text'>
fat_get_cluster() assumes the requested blocknr isn't truncated during
read. _fat_bmap() doesn't follow this rule.

This protects it by -&gt;i_mutex.

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fat: Fix ATTR_RO for directory</title>
<updated>2008-11-06T23:41:21Z</updated>
<author>
<name>OGAWA Hirofumi</name>
</author>
<published>2008-11-06T20:53:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dfc209c0064efef5590f608056a48b61a5cac09c'/>
<id>urn:sha1:dfc209c0064efef5590f608056a48b61a5cac09c</id>
<content type='text'>
FAT has the ATTR_RO (read-only) attribute. But on Windows, the ATTR_RO
of the directory will be just ignored actually, and is used by only
applications as flag. E.g. it's setted for the customized folder by
Explorer.

http://msdn2.microsoft.com/en-us/library/aa969337.aspx

This adds "rodir" option. If user specified it, ATTR_RO is used as
read-only flag even if it's the directory. Otherwise, inode-&gt;i_mode
is not used to hold ATTR_RO (i.e. fat_mode_can_save_ro() returns 0).

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fat: Cleanup FAT attribute stuff</title>
<updated>2008-11-06T23:41:21Z</updated>
<author>
<name>OGAWA Hirofumi</name>
</author>
<published>2008-11-06T20:53:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c0aa1b87bf541affef519eb4879ce7c5a5941ae'/>
<id>urn:sha1:9c0aa1b87bf541affef519eb4879ce7c5a5941ae</id>
<content type='text'>
This adds three helpers:

fat_make_attrs() - makes FAT attributes from inode.
fat_make_mode()  - makes mode_t from FAT attributes.
fat_save_attrs() - saves FAT attributes to inode.

Then this replaces: MSDOS_MKMODE() by fat_make_mode(), fat_attr() by
fat_make_attrs(), -&gt;i_attrs = attr &amp; ATTR_UNUSED by fat_save_attrs().
And for root inode, those is used with ATTR_DIR instead of bogus
ATTR_NONE.

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fat: use fat_detach() in fat_clear_inode()</title>
<updated>2008-11-06T23:41:20Z</updated>
<author>
<name>OGAWA Hirofumi</name>
</author>
<published>2008-11-06T20:53:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a993b542bb4cd3e5a64863b7ef892bbebec2239b'/>
<id>urn:sha1:a993b542bb4cd3e5a64863b7ef892bbebec2239b</id>
<content type='text'>
Use fat_detach() instead of opencoding it.

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fat: improve fat_hash()</title>
<updated>2008-11-06T23:41:20Z</updated>
<author>
<name>OGAWA Hirofumi</name>
</author>
<published>2008-11-06T20:53:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3dfa8228f87ab9960ab8b4718013d68e3c25a43'/>
<id>urn:sha1:d3dfa8228f87ab9960ab8b4718013d68e3c25a43</id>
<content type='text'>
fat_hash() is using the algorithm known as bad. Instead of it, this
uses hash_32(). The following is the summary of test.

old hash:
	hash func (1000 times): 33489 cycles
	total inodes in hash table: 70926
	largest bucket contains: 696
	smallest bucket contains: 54

new hash:
	hash func (1000 times): 33129 cycles
	total inodes in hash table: 70926
	largest bucket contains: 315
	smallest bucket contains: 236

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fat: Fix and cleanup timestamp conversion</title>
<updated>2008-11-06T23:41:20Z</updated>
<author>
<name>OGAWA Hirofumi</name>
</author>
<published>2008-11-06T20:53:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7decd1cb0305b97243f283fa7f4baf5fe613edeb'/>
<id>urn:sha1:7decd1cb0305b97243f283fa7f4baf5fe613edeb</id>
<content type='text'>
This cleans date_dos2unix()/fat_date_unix2dos() up. New code should be
much more readable.

And this fixes those old functions. Those doesn't handle 2100
correctly. 2100 isn't leap year, but old one handles it as leap year.
Also, with this, centi sec is handled and is fixed.

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fat: split include/msdos_fs.h</title>
<updated>2008-11-06T23:41:20Z</updated>
<author>
<name>OGAWA Hirofumi</name>
</author>
<published>2008-11-06T20:53:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e975dae2970d22557662761c8505ce9fd165684'/>
<id>urn:sha1:9e975dae2970d22557662761c8505ce9fd165684</id>
<content type='text'>
This splits __KERNEL__ stuff in include/msdos_fs.h into fs/fat/fat.h.

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fs: remove prepare_write/commit_write</title>
<updated>2008-10-30T18:38:45Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2008-10-29T21:00:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e02ed4b4a2fae34aae766a5bb93ae235f60adb8'/>
<id>urn:sha1:4e02ed4b4a2fae34aae766a5bb93ae235f60adb8</id>
<content type='text'>
Nothing uses prepare_write or commit_write. Remove them from the tree
completely.

[akpm@linux-foundation.org: schedule simple_prepare_write() for unexporting]
Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
