<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/fcntl.c, branch linux-2.6.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2006-10-02T14:57:15Z</updated>
<entry>
<title>[PATCH] file: Add locking to f_getown</title>
<updated>2006-10-02T14:57:15Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2006-10-02T09:17:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=43fa1adb9334bf4585cd53144eb5911488f85bc7'/>
<id>urn:sha1:43fa1adb9334bf4585cd53144eb5911488f85bc7</id>
<content type='text'>
This has been needed for a long time, but now with the advent of a
reference counted struct pid there are real consequences for getting this
wrong.

Someone I think it was Oleg Nesterov pointed out that this construct was
missing locking, when I introduced struct pid.  After taking time to review
the locking construct already present I figured out which lock needs to be
taken.  The other paths that access f_owner.pid take either the f_owner
read or the write lock.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] file: modify struct fown_struct to use a struct pid</title>
<updated>2006-10-02T14:57:14Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2006-10-02T09:17:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=609d7fa9565c754428d2520cac2accc9052e1245'/>
<id>urn:sha1:609d7fa9565c754428d2520cac2accc9052e1245</id>
<content type='text'>
File handles can be requested to send sigio and sigurg to processes.  By
tracking the destination processes using struct pid instead of pid_t we make
the interface safe from all potential pid wrap around problems.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>BUG_ON() Conversion in fs/fcntl.c</title>
<updated>2006-04-02T11:37:19Z</updated>
<author>
<name>Eric Sesterhenn</name>
</author>
<published>2006-04-02T11:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6298aab2ebaa61de39931595f125bc1968905cc'/>
<id>urn:sha1:f6298aab2ebaa61de39931595f125bc1968905cc</id>
<content type='text'>
this changes if() BUG(); constructs to BUG_ON() which is
cleaner and can better optimized away

Signed-off-by: Eric Sesterhenn &lt;snakebyte@gmx.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] Use __read_mostly on some hot fs variables</title>
<updated>2006-03-26T16:56:56Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2006-03-26T09:37:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa3536cc144c1298f2ed9416c33f3b77fa2cd37a'/>
<id>urn:sha1:fa3536cc144c1298f2ed9416c33f3b77fa2cd37a</id>
<content type='text'>
I discovered on oprofile hunting on a SMP platform that dentry lookups were
slowed down because d_hash_mask, d_hash_shift and dentry_hashtable were in
a cache line that contained inodes_stat.  So each time inodes_stats is
changed by a cpu, other cpus have to refill their cache line.

This patch moves some variables to the __read_mostly section, in order to
avoid false sharing.  RCU dentry lookups can go full speed.

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Shrinks sizeof(files_struct) and better layout</title>
<updated>2006-03-23T15:38:09Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2006-03-23T11:00:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c9e63fd38a2fb2181668a0cdd622a3c23cfd567'/>
<id>urn:sha1:0c9e63fd38a2fb2181668a0cdd622a3c23cfd567</id>
<content type='text'>
1) Reduce the size of (struct fdtable) to exactly 64 bytes on 32bits
   platforms, lowering kmalloc() allocated space by 50%.

2) Reduce the size of (files_struct), using a special 32 bits (or
   64bits) embedded_fd_set, instead of a 1024 bits fd_set for the
   close_on_exec_init and open_fds_init fields.  This save some ram (248
   bytes per task) as most tasks dont open more than 32 files.  D-Cache
   footprint for such tasks is also reduced to the minimum.

3) Reduce size of allocated fdset.  Currently two full pages are
   allocated, that is 32768 bits on x86 for example, and way too much.  The
   minimum is now L1_CACHE_BYTES.

UP and SMP should benefit from this patch, because most tasks will touch
only one cache line when open()/close() stdin/stdout/stderr (0/1/2),
(next_fd, close_on_exec_init, open_fds_init, fd_array[0 ..  2] being in the
same cache line)

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] fcntl F_SETFL and read-only IS_APPEND files</title>
<updated>2006-02-03T16:32:07Z</updated>
<author>
<name>dean gaudet</name>
</author>
<published>2006-02-03T11:04:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7d95c8f27d9be65bf160f1edaf653d33dfceb58c'/>
<id>urn:sha1:7d95c8f27d9be65bf160f1edaf653d33dfceb58c</id>
<content type='text'>
There is code in setfl() which attempts to preserve the O_APPEND flag on
IS_APPEND files...  however IS_APPEND files could also be opened O_RDONLY
and in that case setfl() should not require O_APPEND...

coreutils 5.93 tail -f attempts to set O_NONBLOCK even on regular files...
unfortunately if you try this on an append-only log file the result is
this:

fcntl64(3, F_GETFL)                     = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = -1 EPERM (Operation not permitted)

I offer up the patch below as one way of fixing the problem...  i've tested
it fixes the problem with tail -f but haven't really tested beyond that.

(I also reported the coreutils bug upstream... it shouldn't fail imho...
&lt;https://savannah.gnu.org/bugs/index.php?func=detailitem&amp;item_id=15473&gt;)

Signed-off-by: dean gaudet &lt;dean@arctic.org&gt;
Cc: Al Viro &lt;viro@ftp.linux.org.uk&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Unlinline a bunch of other functions</title>
<updated>2006-01-15T02:27:06Z</updated>
<author>
<name>Arjan van de Ven</name>
</author>
<published>2006-01-14T21:20:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=858119e159384308a5dde67776691a2ebf70df0f'/>
<id>urn:sha1:858119e159384308a5dde67776691a2ebf70df0f</id>
<content type='text'>
Remove the "inline" keyword from a bunch of big functions in the kernel with
the goal of shrinking it by 30kb to 40kb

Signed-off-by: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Jeff Garzik &lt;jgarzik@pobox.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] capable/capability.h (fs/)</title>
<updated>2006-01-12T02:42:13Z</updated>
<author>
<name>Randy Dunlap</name>
</author>
<published>2006-01-11T20:17:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=16f7e0fe2ecc30f30652e8185e1772cdebe39109'/>
<id>urn:sha1:16f7e0fe2ecc30f30652e8185e1772cdebe39109</id>
<content type='text'>
fs: Use &lt;linux/capability.h&gt; where capable() is used.

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Acked-by: Tim Schmielau &lt;tim@physik3.uni-rostock.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] sigio: cleanup, don't take tasklist twice</title>
<updated>2006-01-09T04:13:57Z</updated>
<author>
<name>Oleg Nesterov</name>
</author>
<published>2006-01-08T09:03:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=850d6fbe70c62a9792eac3e8ef34f2f09f209895'/>
<id>urn:sha1:850d6fbe70c62a9792eac3e8ef34f2f09f209895</id>
<content type='text'>
The only user of send_sigio_to_task() already holds tasklist_lock, so it is
better not to send the signal via send_group_sig_info() (which takes
tasklist recursively) but use group_send_sig_info().

The same change in send_sigurg()-&gt;send_sigurg_to_task().

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: "Paul E. McKenney" &lt;paulmck@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] files: lock-free fd look-up</title>
<updated>2005-09-09T20:57:55Z</updated>
<author>
<name>Dipankar Sarma</name>
</author>
<published>2005-09-09T20:04:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b835996f628eadb55c5fb222ba46fe9395bf73c7'/>
<id>urn:sha1:b835996f628eadb55c5fb222ba46fe9395bf73c7</id>
<content type='text'>
With the use of RCU in files structure, the look-up of files using fds can now
be lock-free.  The lookup is protected by rcu_read_lock()/rcu_read_unlock().
This patch changes the readers to use lock-free lookup.

Signed-off-by: Maneesh Soni &lt;maneesh@in.ibm.com&gt;
Signed-off-by: Ravikiran Thirumalai &lt;kiran_th@gmail.com&gt;
Signed-off-by: Dipankar Sarma &lt;dipankar@in.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
