<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/internal.h, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-03-07T23:05:12Z</updated>
<entry>
<title>Fix over-zealous flush_disk when changing device size.</title>
<updated>2011-03-07T23:05:12Z</updated>
<author>
<name>NeilBrown</name>
</author>
<published>2011-02-24T06:25:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=645557910671f18c97ce78fd7d3949a1c3927486'/>
<id>urn:sha1:645557910671f18c97ce78fd7d3949a1c3927486</id>
<content type='text'>
commit 93b270f76e7ef3b81001576860c2701931cdc78b upstream.

There are two cases when we call flush_disk.
In one, the device has disappeared (check_disk_change) so any
data will hold becomes irrelevant.
In the oter, the device has changed size (check_disk_size_change)
so data we hold may be irrelevant.

In both cases it makes sense to discard any 'clean' buffers,
so they will be read back from the device if needed.

In the former case it makes sense to discard 'dirty' buffers
as there will never be anywhere safe to write the data.  In the
second case it *does*not* make sense to discard dirty buffers
as that will lead to file system corruption when you simply enlarge
the containing devices.

flush_disk calls __invalidate_devices.
__invalidate_device calls both invalidate_inodes and invalidate_bdev.

invalidate_inodes *does* discard I_DIRTY inodes and this does lead
to fs corruption.

invalidate_bev *does*not* discard dirty pages, but I don't really care
about that at present.

So this patch adds a flag to __invalidate_device (calling it
__invalidate_device2) to indicate whether dirty buffers should be
killed, and this is passed to invalidate_inodes which can choose to
skip dirty inodes.

flusk_disk then passes true from check_disk_change and false from
check_disk_size_change.

dm avoids tripping over this problem by calling i_size_write directly
rathher than using check_disk_size_change.

md does use check_disk_size_change and so is affected.

This regression was introduced by commit 608aeef17a which causes
check_disk_size_change to call flush_disk, so it is suitable for any
kernel since 2.6.27.

Acked-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Cc: Andrew Patterson &lt;andrew.patterson@hp.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>braino in internal.h</title>
<updated>2010-10-29T09:49:13Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2010-10-29T09:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4cdbd8bfb87ceff455aae85727077889b75001b'/>
<id>urn:sha1:a4cdbd8bfb87ceff455aae85727077889b75001b</id>
<content type='text'>
wrong return type...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>split invalidate_inodes()</title>
<updated>2010-10-26T01:27:18Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2010-10-26T00:49:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63997e98a3be68d7cec806d22bf9b02b2e1daabb'/>
<id>urn:sha1:63997e98a3be68d7cec806d22bf9b02b2e1daabb</id>
<content type='text'>
Pull removal of fsnotify marks into generic_shutdown_super().
Split umount-time work into a new function - evict_inodes().
Make sure that invalidate_inodes() will be able to cope with
I_FREEING once we change locking in iput().

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: Convert nr_inodes and nr_unused to per-cpu counters</title>
<updated>2010-10-26T01:26:09Z</updated>
<author>
<name>Dave Chinner</name>
</author>
<published>2010-10-23T09:03:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cffbc8aa334f55c9ed42d25202eb3ebf3a97c195'/>
<id>urn:sha1:cffbc8aa334f55c9ed42d25202eb3ebf3a97c195</id>
<content type='text'>
The number of inodes allocated does not need to be tied to the
addition or removal of an inode to/from a list. If we are not tied
to a list lock, we could update the counters when inodes are
initialised or destroyed, but to do that we need to convert the
counters to be per-cpu (i.e. independent of a lock). This means that
we have the freedom to change the list/locking implementation
without needing to care about the counters.

Based on a patch originally from Eric Dumazet.

[AV: cleaned up a bit, fixed build breakage on weird configs

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>unexport invalidate_inodes</title>
<updated>2010-10-26T01:23:32Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2010-10-24T15:13:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8dade34e3df581bc36ca2afe6e27055e178801c'/>
<id>urn:sha1:a8dade34e3df581bc36ca2afe6e27055e178801c</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: brlock vfsmount_lock</title>
<updated>2010-08-18T12:35:48Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2010-08-17T18:37:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99b7db7b8ffd6bb755eb0a175596421a0b581cb2'/>
<id>urn:sha1:99b7db7b8ffd6bb755eb0a175596421a0b581cb2</id>
<content type='text'>
fs: brlock vfsmount_lock

Use a brlock for the vfsmount lock. It must be taken for write whenever
modifying the mount hash or associated fields, and may be taken for read when
performing mount hash lookups.

A new lock is added for the mnt-id allocator, so it doesn't need to take
the heavy vfsmount write-lock.

The number of atomics should remain the same for fastpath rlock cases, though
code would be slightly slower due to per-cpu access. Scalability is not not be
much improved in common cases yet, due to other locks (ie. dcache_lock) getting
in the way. However path lookups crossing mountpoints should be one case where
scalability is improved (currently requiring the global lock).

The slowpath is slower due to use of brlock. On a 64 core, 64 socket, 32 node
Altix system (high latency to remote nodes), a simple umount microbenchmark
(mount --bind mnt mnt2 ; umount mnt2 loop 1000 times), before this patch it
took 6.8s, afterwards took 7.1s, about 5% slower.

Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>tty: fix fu_list abuse</title>
<updated>2010-08-18T12:35:47Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2010-08-17T18:37:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d996b62a8df1d935b01319bf8defb95b5709f7b8'/>
<id>urn:sha1:d996b62a8df1d935b01319bf8defb95b5709f7b8</id>
<content type='text'>
tty: fix fu_list abuse

tty code abuses fu_list, which causes a bug in remount,ro handling.

If a tty device node is opened on a filesystem, then the last link to the inode
removed, the filesystem will be allowed to be remounted readonly. This is
because fs_may_remount_ro does not find the 0 link tty inode on the file sb
list (because the tty code incorrectly removed it to use for its own purpose).
This can result in a filesystem with errors after it is marked "clean".

Taking idea from Christoph's initial patch, allocate a tty private struct
at file-&gt;private_data and put our required list fields in there, linking
file and tty. This makes tty nodes behave the same way as other device nodes
and avoid meddling with the vfs, and avoids this bug.

The error handling is not trivial in the tty code, so for this bugfix, I take
the simple approach of using __GFP_NOFAIL and don't worry about memory errors.
This is not a problem because our allocator doesn't fail small allocs as a rule
anyway. So proper error handling is left as an exercise for tty hackers.

[ Arguably filesystem's device inode would ideally be divorced from the
driver's pseudo inode when it is opened, but in practice it's not clear whether
that will ever be worth implementing. ]

Cc: linux-kernel@vger.kernel.org
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Bury __put_super_and_need_restart()</title>
<updated>2010-05-21T22:31:16Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2010-03-23T01:13:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=35cf7ba0b46dc3582a01c3860b14bff122662aa3'/>
<id>urn:sha1:35cf7ba0b46dc3582a01c3860b14bff122662aa3</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Take vfsmount_lock to fs/internal.h</title>
<updated>2010-03-03T19:07:59Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2010-02-05T07:01:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47cd813f2984569570021ce3d34cdf9cb20aa6a2'/>
<id>urn:sha1:47cd813f2984569570021ce3d34cdf9cb20aa6a2</id>
<content type='text'>
no more users left outside of fs/*.c (and very few outside of
fs/namespace.c, actually)

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Fix f_flags/f_mode in case of lookup_instantiate_filp() from open(pathname, 3)</title>
<updated>2009-12-22T17:27:34Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2009-12-19T15:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=482928d59db668b8d82a48717f78986d8cea72e9'/>
<id>urn:sha1:482928d59db668b8d82a48717f78986d8cea72e9</id>
<content type='text'>
Just set f_flags when shoving struct file into nameidata; don't
postpone that until __dentry_open().  do_filp_open() has correct
value; lookup_instantiate_filp() doesn't - we lose the difference
between O_RDWR and 3 by that point.

We still set .intent.open.flags, so no fs code needs to be changed.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
