<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs, branch v2.6.20</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[PATCH] revert blockdev direct io back to 2.6.19 version</title>
<updated>2007-02-03T19:26:06+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2007-02-03T09:14:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b2e895dbd80c420bfc0937c3729b4afe073b3848'/>
<id>b2e895dbd80c420bfc0937c3729b4afe073b3848</id>
<content type='text'>
Andrew Vasquez is reporting as-iosched oopses and a 65% throughput
slowdown due to the recent special-casing of direct-io against
blockdevs.  We don't know why either of these things are occurring.

The patch minimally reverts us back to the 2.6.19 code for a 2.6.20
release.

Cc: Andrew Vasquez &lt;andrew.vasquez@qlogic.com&gt;
Cc: Ken Chen &lt;kenchen@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Andrew Vasquez is reporting as-iosched oopses and a 65% throughput
slowdown due to the recent special-casing of direct-io against
blockdevs.  We don't know why either of these things are occurring.

The patch minimally reverts us back to the 2.6.19 code for a 2.6.20
release.

Cc: Andrew Vasquez &lt;andrew.vasquez@qlogic.com&gt;
Cc: Ken Chen &lt;kenchen@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] aio: fix buggy put_ioctx call in aio_complete - v2</title>
<updated>2007-02-03T19:26:06+00:00</updated>
<author>
<name>Ken Chen</name>
<email>kenchen@google.com</email>
</author>
<published>2007-02-03T09:13:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dee11c2364f51cac53df17d742a0c69097e29a4e'/>
<id>dee11c2364f51cac53df17d742a0c69097e29a4e</id>
<content type='text'>
An AIO bug was reported that sleeping function is being called in softirq
context:

BUG: warning at kernel/mutex.c:132/__mutex_lock_common()
Call Trace:
     [&lt;a000000100577b00&gt;] __mutex_lock_slowpath+0x640/0x6c0
     [&lt;a000000100577ba0&gt;] mutex_lock+0x20/0x40
     [&lt;a0000001000a25b0&gt;] flush_workqueue+0xb0/0x1a0
     [&lt;a00000010018c0c0&gt;] __put_ioctx+0xc0/0x240
     [&lt;a00000010018d470&gt;] aio_complete+0x2f0/0x420
     [&lt;a00000010019cc80&gt;] finished_one_bio+0x200/0x2a0
     [&lt;a00000010019d1c0&gt;] dio_bio_complete+0x1c0/0x200
     [&lt;a00000010019d260&gt;] dio_bio_end_aio+0x60/0x80
     [&lt;a00000010014acd0&gt;] bio_endio+0x110/0x1c0
     [&lt;a0000001002770e0&gt;] __end_that_request_first+0x180/0xba0
     [&lt;a000000100277b90&gt;] end_that_request_chunk+0x30/0x60
     [&lt;a0000002073c0c70&gt;] scsi_end_request+0x50/0x300 [scsi_mod]
     [&lt;a0000002073c1240&gt;] scsi_io_completion+0x200/0x8a0 [scsi_mod]
     [&lt;a0000002074729b0&gt;] sd_rw_intr+0x330/0x860 [sd_mod]
     [&lt;a0000002073b3ac0&gt;] scsi_finish_command+0x100/0x1c0 [scsi_mod]
     [&lt;a0000002073c2910&gt;] scsi_softirq_done+0x230/0x300 [scsi_mod]
     [&lt;a000000100277d20&gt;] blk_done_softirq+0x160/0x1c0
     [&lt;a000000100083e00&gt;] __do_softirq+0x200/0x240
     [&lt;a000000100083eb0&gt;] do_softirq+0x70/0xc0

See report: http://marc.theaimsgroup.com/?l=linux-kernel&amp;m=116599593200888&amp;w=2

flush_workqueue() is not allowed to be called in the softirq context.
However, aio_complete() called from I/O interrupt can potentially call
put_ioctx with last ref count on ioctx and triggers bug.  It is simply
incorrect to perform ioctx freeing from aio_complete.

The bug is trigger-able from a race between io_destroy() and aio_complete().
A possible scenario:

cpu0                               cpu1
io_destroy                         aio_complete
  wait_for_all_aios {                __aio_put_req
     ...                                 ctx-&gt;reqs_active--;
     if (!ctx-&gt;reqs_active)
        return;
  }
  ...
  put_ioctx(ioctx)

                                     put_ioctx(ctx);
                                        __put_ioctx
                                          bam! Bug trigger!

The real problem is that the condition check of ctx-&gt;reqs_active in
wait_for_all_aios() is incorrect that access to reqs_active is not
being properly protected by spin lock.

This patch adds that protective spin lock, and at the same time removes
all duplicate ref counting for each kiocb as reqs_active is already used
as a ref count for each active ioctx.  This also ensures that buggy call
to flush_workqueue() in softirq context is eliminated.

Signed-off-by: "Ken Chen" &lt;kenchen@google.com&gt;
Cc: Zach Brown &lt;zach.brown@oracle.com&gt;
Cc: Suparna Bhattacharya &lt;suparna@in.ibm.com&gt;
Cc: Benjamin LaHaise &lt;bcrl@kvack.org&gt;
Cc: Badari Pulavarty &lt;pbadari@us.ibm.com&gt;
Cc: &lt;stable@kernel.org&gt;
Acked-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An AIO bug was reported that sleeping function is being called in softirq
context:

BUG: warning at kernel/mutex.c:132/__mutex_lock_common()
Call Trace:
     [&lt;a000000100577b00&gt;] __mutex_lock_slowpath+0x640/0x6c0
     [&lt;a000000100577ba0&gt;] mutex_lock+0x20/0x40
     [&lt;a0000001000a25b0&gt;] flush_workqueue+0xb0/0x1a0
     [&lt;a00000010018c0c0&gt;] __put_ioctx+0xc0/0x240
     [&lt;a00000010018d470&gt;] aio_complete+0x2f0/0x420
     [&lt;a00000010019cc80&gt;] finished_one_bio+0x200/0x2a0
     [&lt;a00000010019d1c0&gt;] dio_bio_complete+0x1c0/0x200
     [&lt;a00000010019d260&gt;] dio_bio_end_aio+0x60/0x80
     [&lt;a00000010014acd0&gt;] bio_endio+0x110/0x1c0
     [&lt;a0000001002770e0&gt;] __end_that_request_first+0x180/0xba0
     [&lt;a000000100277b90&gt;] end_that_request_chunk+0x30/0x60
     [&lt;a0000002073c0c70&gt;] scsi_end_request+0x50/0x300 [scsi_mod]
     [&lt;a0000002073c1240&gt;] scsi_io_completion+0x200/0x8a0 [scsi_mod]
     [&lt;a0000002074729b0&gt;] sd_rw_intr+0x330/0x860 [sd_mod]
     [&lt;a0000002073b3ac0&gt;] scsi_finish_command+0x100/0x1c0 [scsi_mod]
     [&lt;a0000002073c2910&gt;] scsi_softirq_done+0x230/0x300 [scsi_mod]
     [&lt;a000000100277d20&gt;] blk_done_softirq+0x160/0x1c0
     [&lt;a000000100083e00&gt;] __do_softirq+0x200/0x240
     [&lt;a000000100083eb0&gt;] do_softirq+0x70/0xc0

See report: http://marc.theaimsgroup.com/?l=linux-kernel&amp;m=116599593200888&amp;w=2

flush_workqueue() is not allowed to be called in the softirq context.
However, aio_complete() called from I/O interrupt can potentially call
put_ioctx with last ref count on ioctx and triggers bug.  It is simply
incorrect to perform ioctx freeing from aio_complete.

The bug is trigger-able from a race between io_destroy() and aio_complete().
A possible scenario:

cpu0                               cpu1
io_destroy                         aio_complete
  wait_for_all_aios {                __aio_put_req
     ...                                 ctx-&gt;reqs_active--;
     if (!ctx-&gt;reqs_active)
        return;
  }
  ...
  put_ioctx(ioctx)

                                     put_ioctx(ctx);
                                        __put_ioctx
                                          bam! Bug trigger!

The real problem is that the condition check of ctx-&gt;reqs_active in
wait_for_all_aios() is incorrect that access to reqs_active is not
being properly protected by spin lock.

This patch adds that protective spin lock, and at the same time removes
all duplicate ref counting for each kiocb as reqs_active is already used
as a ref count for each active ioctx.  This also ensures that buggy call
to flush_workqueue() in softirq context is eliminated.

Signed-off-by: "Ken Chen" &lt;kenchen@google.com&gt;
Cc: Zach Brown &lt;zach.brown@oracle.com&gt;
Cc: Suparna Bhattacharya &lt;suparna@in.ibm.com&gt;
Cc: Benjamin LaHaise &lt;bcrl@kvack.org&gt;
Cc: Badari Pulavarty &lt;pbadari@us.ibm.com&gt;
Cc: &lt;stable@kernel.org&gt;
Acked-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] procfs: Fix listing of /proc/NOT_A_TGID/task</title>
<updated>2007-02-02T00:22:41+00:00</updated>
<author>
<name>Guillaume Chazarain</name>
<email>guichaz@yahoo.fr</email>
</author>
<published>2007-02-01T07:48:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7d8952440f4090522b740257f1c6b2cf96413969'/>
<id>7d8952440f4090522b740257f1c6b2cf96413969</id>
<content type='text'>
Listing /proc/PID/task were PID is not a TGID should not result in
duplicated entries.

	[g ~]$ pidof thunderbird-bin
	2751
	[g ~]$ ls /proc/2751/task
	2751  2770  2771  2824  2826  2834  2835  2851  2853
	[g ~]$ ls /proc/2770/task
	2751  2770  2771  2824  2826  2834  2835  2851  2853
	2770  2771  2824  2826  2834  2835  2851  2853
	[g ~]$

Signed-off-by: Guillaume Chazarain &lt;guichaz@yahoo.fr&gt;
Acked-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@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Listing /proc/PID/task were PID is not a TGID should not result in
duplicated entries.

	[g ~]$ pidof thunderbird-bin
	2751
	[g ~]$ ls /proc/2751/task
	2751  2770  2771  2824  2826  2834  2835  2851  2853
	[g ~]$ ls /proc/2770/task
	2751  2770  2771  2824  2826  2834  2835  2851  2853
	2770  2771  2824  2826  2834  2835  2851  2853
	[g ~]$

Signed-off-by: Guillaume Chazarain &lt;guichaz@yahoo.fr&gt;
Acked-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@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] endianness bug: ntohl() misspelled as &gt;&gt; 24 in fh_verify().</title>
<updated>2007-02-02T00:17:06+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2007-02-01T13:52:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fc2dd2e51a1940acac665696e6a70a1a73dc90a4'/>
<id>fc2dd2e51a1940acac665696e6a70a1a73dc90a4</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ntfs: kmap_atomic() atomicity fix</title>
<updated>2007-01-31T00:01:35+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2007-01-30T22:36:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fa8609da993b04dc2dd762173a6d0ab1a192e256'/>
<id>fa8609da993b04dc2dd762173a6d0ab1a192e256</id>
<content type='text'>
The KM_BIO_SRC_IRQ kmap slot requires local irq protection.

Acked-by: Anton Altaparmakov &lt;aia21@cantab.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The KM_BIO_SRC_IRQ kmap slot requires local irq protection.

Acked-by: Anton Altaparmakov &lt;aia21@cantab.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Remove warning: VFS is out of sync with lock manager</title>
<updated>2007-01-31T00:01:35+00:00</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2007-01-30T22:36:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=46bae1a9a767f3ae8e636d96f9b95703df34b398'/>
<id>46bae1a9a767f3ae8e636d96f9b95703df34b398</id>
<content type='text'>
But keep it as a dprintk

The message can be generated in a quite normal situation:
 If a 'lock' request is interrupted, then the lock client needs to
  record that the server has the lock, incase it does.
 When we come the unlock, the server might say it doesn't, even
  though we think it does (or might) and this generates the message.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Acked-by: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
But keep it as a dprintk

The message can be generated in a quite normal situation:
 If a 'lock' request is interrupted, then the lock client needs to
  record that the server has the lock, incase it does.
 When we come the unlock, the server might say it doesn't, even
  though we think it does (or might) and this generates the message.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Acked-by: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ufs: reallocation fix</title>
<updated>2007-01-30T16:26:45+00:00</updated>
<author>
<name>Evgeniy Dushistov</name>
<email>dushistov@mail.ru</email>
</author>
<published>2007-01-29T21:19:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=efee2b812645d10824bf6cb247789910bcb66881'/>
<id>efee2b812645d10824bf6cb247789910bcb66881</id>
<content type='text'>
In blocks reallocation function sometimes does not update some of
buffer_head::b_blocknr, which may and cause data damage.

Signed-off-by: Evgeniy Dushistov &lt;dushistov@mail.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In blocks reallocation function sometimes does not update some of
buffer_head::b_blocknr, which may and cause data damage.

Signed-off-by: Evgeniy Dushistov &lt;dushistov@mail.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ufs: truncate negative to unsigned fix</title>
<updated>2007-01-30T16:26:45+00:00</updated>
<author>
<name>Evgeniy Dushistov</name>
<email>dushistov@mail.ru</email>
</author>
<published>2007-01-29T21:19:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8682164a66325cab07620082eb7f413b547f4b4a'/>
<id>8682164a66325cab07620082eb7f413b547f4b4a</id>
<content type='text'>
During ufs_trunc_direct which is subroutine of ufs::truncate, we try the first
of all free parts of block and then whole blocks.  But we calculate size of
block's part to free in the wrong way.

This may cause bad update of used blocks and fragments statistic, and you can
got report that you have free 32T on 1Gb partition.

Signed-off-by: Evgeniy Dushistov &lt;dushistov@mail.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During ufs_trunc_direct which is subroutine of ufs::truncate, we try the first
of all free parts of block and then whole blocks.  But we calculate size of
block's part to free in the wrong way.

This may cause bad update of used blocks and fragments statistic, and you can
got report that you have free 32T on 1Gb partition.

Signed-off-by: Evgeniy Dushistov &lt;dushistov@mail.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ufs: alloc metadata null page fix</title>
<updated>2007-01-30T16:26:45+00:00</updated>
<author>
<name>Evgeniy Dushistov</name>
<email>dushistov@mail.ru</email>
</author>
<published>2007-01-29T21:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a685e26fff387db350966f88eaad515bf41c4705'/>
<id>a685e26fff387db350966f88eaad515bf41c4705</id>
<content type='text'>
These series of patches result of UFS1 write support stress testing, like
running fsx-linux, untar and build linux kernel etc

We pass from ufs::get_block_t to levels below: pointer to the current page, to
make possible things like reallocation of blocks on the fly, and we also uses
this pointer for indication, what actually we allocate data block or meta data
block, but currently we make decision about what we allocate on the wrong
level, this may and cause oops if we allocate blocks in some special order.

Signed-off-by: Evgeniy Dushistov &lt;dushistov@mail.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These series of patches result of UFS1 write support stress testing, like
running fsx-linux, untar and build linux kernel etc

We pass from ufs::get_block_t to levels below: pointer to the current page, to
make possible things like reallocation of blocks on the fly, and we also uses
this pointer for indication, what actually we allocate data block or meta data
block, but currently we make decision about what we allocate on the wrong
level, this may and cause oops if we allocate blocks in some special order.

Signed-off-by: Evgeniy Dushistov &lt;dushistov@mail.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] fuse: fix bug in control filesystem mount</title>
<updated>2007-01-30T16:26:45+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>miklos@szeredi.hu</email>
</author>
<published>2007-01-29T21:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ff79544754631cf3d237ff47b7d0e7ab2d211fcf'/>
<id>ff79544754631cf3d237ff47b7d0e7ab2d211fcf</id>
<content type='text'>
The BUG in fuse_ctl_add_dentry() could be triggered if the control
filesystem was unmounted and mounted again while one or more fuse
filesystems were present.

The fix is to reset the dentry counter in fuse_ctl_kill_sb().

Bug reported by Florent Mertens.

Signed-off-by: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The BUG in fuse_ctl_add_dentry() could be triggered if the control
filesystem was unmounted and mounted again while one or more fuse
filesystems were present.

The fix is to reset the dentry counter in fuse_ctl_kill_sb().

Bug reported by Florent Mertens.

Signed-off-by: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
