<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/block/cmd-filter.c, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>block: get rid of queue-private command filter</title>
<updated>2009-07-01T08:56:26+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2009-06-26T14:27:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=018e0446890661504783f92388ecce7138c1566d'/>
<id>018e0446890661504783f92388ecce7138c1566d</id>
<content type='text'>
The initial patches to support this through sysfs export were broken
and have been if 0'ed out in any release. So lets just kill the code
and reclaim some space in struct request_queue, if anyone would later
like to fixup the sysfs bits, the git history can easily restore
the removed bits.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The initial patches to support this through sysfs export were broken
and have been if 0'ed out in any release. So lets just kill the code
and reclaim some space in struct request_queue, if anyone would later
like to fixup the sysfs bits, the git history can easily restore
the removed bits.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] Make scsi.h independent of the rest of the scsi includes</title>
<updated>2009-03-12T17:58:13+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2009-02-09T03:59:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f290f1970f01287eaaffc798a677594a57ebd65e'/>
<id>f290f1970f01287eaaffc798a677594a57ebd65e</id>
<content type='text'>
This allows it to compile and be used on the ps3 platform that wants
to use the #define values in scsi.h without actually having
CONFIG_SCSI set.

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows it to compile and be used on the ps3 platform that wants
to use the #define values in scsi.h without actually having
CONFIG_SCSI set.

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] introduce fmode_t, do annotations</title>
<updated>2008-10-21T11:47:06+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-09-02T19:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=aeb5d727062a0238a2f96c9c380fbd2be4640c6f'/>
<id>aeb5d727062a0238a2f96c9c380fbd2be4640c6f</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&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;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: move holder_dir from disk to part0</title>
<updated>2008-10-09T06:56:08+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-08-25T10:56:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4c46501d1659475dc6c89554af6ce7fe6ecf615c'/>
<id>4c46501d1659475dc6c89554af6ce7fe6ecf615c</id>
<content type='text'>
Move disk-&gt;holder_dir to part0-&gt;holder_dir.  Kill now mostly
superflous bdev_get_holder().

While at it, kill superflous kobject_get/put() around holder_dir,
slave_dir and cmd_filter creation and collapse
disk_sysfs_add_subdirs() into register_disk().  These serve no purpose
but obfuscating the code.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move disk-&gt;holder_dir to part0-&gt;holder_dir.  Kill now mostly
superflous bdev_get_holder().

While at it, kill superflous kobject_get/put() around holder_dir,
slave_dir and cmd_filter creation and collapse
disk_sysfs_add_subdirs() into register_disk().  These serve no purpose
but obfuscating the code.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: disable sysfs parts of the disk command filter</title>
<updated>2008-09-11T12:20:23+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2008-09-11T12:20:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2dc75d3c3b49c64fd26b4832a7efb75546cb3fc5'/>
<id>2dc75d3c3b49c64fd26b4832a7efb75546cb3fc5</id>
<content type='text'>
We still have life time issues with the sysfs command filter kobject,
so disable it for 2.6.27 release. We can revisit this and make it work
properly for 2.6.28, for 2.6.27 release it's too risky.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We still have life time issues with the sysfs command filter kobject,
so disable it for 2.6.27 release. We can revisit this and make it work
properly for 2.6.28, for 2.6.27 release it's too risky.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>remove blk_register_filter and blk_unregister_filter in gendisk</title>
<updated>2008-08-29T09:47:07+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-08-29T09:47:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bb23b431db7405f6d79f989ad0236bf6428ba1cb'/>
<id>bb23b431db7405f6d79f989ad0236bf6428ba1cb</id>
<content type='text'>
This patch remove blk_register_filter and blk_unregister_filter in
gendisk, and adds them to sd.c, sr.c. and ide-cd.c

The commit abf5439370491dd6fbb4fe1a7939680d2a9bc9d4 moved cmdfilter
from gendisk to request_queue. It turned out that in some subsystems
multiple gendisks share a single request_queue. So we get:

Using physmap partition information
Creating 3 MTD partitions on "physmap-flash":
0x00000000-0x01c00000 : "User FS"
0x01c00000-0x01c40000 : "booter"
kobject (8511c410): tried to init an initialized object, something is seriously wrong.
Call Trace:
[&lt;8036644c&gt;] dump_stack+0x8/0x34
[&lt;8021f050&gt;] kobject_init+0x50/0xcc
[&lt;8021fa18&gt;] kobject_init_and_add+0x24/0x58
[&lt;8021d20c&gt;] blk_register_filter+0x4c/0x64
[&lt;8021c194&gt;] add_disk+0x78/0xe0
[&lt;8027d14c&gt;] add_mtd_blktrans_dev+0x254/0x278
[&lt;8027c8f0&gt;] blktrans_notify_add+0x40/0x78
[&lt;80279c00&gt;] add_mtd_device+0xd0/0x150
[&lt;8027b090&gt;] add_mtd_partitions+0x568/0x5d8
[&lt;80285458&gt;] physmap_flash_probe+0x2ac/0x334
[&lt;802644f8&gt;] driver_probe_device+0x12c/0x244
[&lt;8026465c&gt;] __driver_attach+0x4c/0x84
[&lt;80263c64&gt;] bus_for_each_dev+0x58/0xac
[&lt;802633ec&gt;] bus_add_driver+0xc4/0x24c
[&lt;802648e0&gt;] driver_register+0xcc/0x184
[&lt;80100460&gt;] _stext+0x60/0x1bc

In the long term, we need to fix such subsystems but we need a quick
fix now. This patch add the command filter support to only sd and sr
though it might be useful for other SG_IO users (such as cciss).

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Reported-by: Manuel Lauss &lt;mano@roarinelk.homelinux.net&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch remove blk_register_filter and blk_unregister_filter in
gendisk, and adds them to sd.c, sr.c. and ide-cd.c

The commit abf5439370491dd6fbb4fe1a7939680d2a9bc9d4 moved cmdfilter
from gendisk to request_queue. It turned out that in some subsystems
multiple gendisks share a single request_queue. So we get:

Using physmap partition information
Creating 3 MTD partitions on "physmap-flash":
0x00000000-0x01c00000 : "User FS"
0x01c00000-0x01c40000 : "booter"
kobject (8511c410): tried to init an initialized object, something is seriously wrong.
Call Trace:
[&lt;8036644c&gt;] dump_stack+0x8/0x34
[&lt;8021f050&gt;] kobject_init+0x50/0xcc
[&lt;8021fa18&gt;] kobject_init_and_add+0x24/0x58
[&lt;8021d20c&gt;] blk_register_filter+0x4c/0x64
[&lt;8021c194&gt;] add_disk+0x78/0xe0
[&lt;8027d14c&gt;] add_mtd_blktrans_dev+0x254/0x278
[&lt;8027c8f0&gt;] blktrans_notify_add+0x40/0x78
[&lt;80279c00&gt;] add_mtd_device+0xd0/0x150
[&lt;8027b090&gt;] add_mtd_partitions+0x568/0x5d8
[&lt;80285458&gt;] physmap_flash_probe+0x2ac/0x334
[&lt;802644f8&gt;] driver_probe_device+0x12c/0x244
[&lt;8026465c&gt;] __driver_attach+0x4c/0x84
[&lt;80263c64&gt;] bus_for_each_dev+0x58/0xac
[&lt;802633ec&gt;] bus_add_driver+0xc4/0x24c
[&lt;802648e0&gt;] driver_register+0xcc/0x184
[&lt;80100460&gt;] _stext+0x60/0x1bc

In the long term, we need to fix such subsystems but we need a quick
fix now. This patch add the command filter support to only sd and sr
though it might be useful for other SG_IO users (such as cciss).

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Reported-by: Manuel Lauss &lt;mano@roarinelk.homelinux.net&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: clean up cmdfilter sysfs interface</title>
<updated>2008-08-27T07:50:19+00:00</updated>
<author>
<name>Adel Gadllah</name>
<email>adel.gadllah@gmail.com</email>
</author>
<published>2008-08-16T05:21:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a4a778971b9cfcbedb8648ba502d801f7db04c47'/>
<id>a4a778971b9cfcbedb8648ba502d801f7db04c47</id>
<content type='text'>
This patch changes the interface of the cmd filter to use a +/-
notation like:

echo -- +0x02 +0x03 -0x08

If neither + or - is given it defaults to + (allow command).

Note: The interface was added in 2.6.17-rc1 and is unused and
undocumented so far so it's safe to change it.

Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Reviewed-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: jens.axboe@oracle.com
Cc: James.Bottomley@hansenpartnership.com
Cc: dan.j.williams@intel.com
Cc: pjones@redhat.com
Cc: viro@zeniv.linux.org.uk
Cc: dougg@torque.net
Signed-off-by: Adel Gadllah &lt;adel.gadllah@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes the interface of the cmd filter to use a +/-
notation like:

echo -- +0x02 +0x03 -0x08

If neither + or - is given it defaults to + (allow command).

Note: The interface was added in 2.6.17-rc1 and is unused and
undocumented so far so it's safe to change it.

Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Reviewed-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: jens.axboe@oracle.com
Cc: James.Bottomley@hansenpartnership.com
Cc: dan.j.williams@intel.com
Cc: pjones@redhat.com
Cc: viro@zeniv.linux.org.uk
Cc: dougg@torque.net
Signed-off-by: Adel Gadllah &lt;adel.gadllah@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: rename blk_scsi_cmd_filter to blk_cmd_filter</title>
<updated>2008-08-27T07:50:19+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-07-26T09:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4beab5c623fef4622f9a8593f85760ff10b5a3f7'/>
<id>4beab5c623fef4622f9a8593f85760ff10b5a3f7</id>
<content type='text'>
Technically, the cmd_filter would be applied to other protocols though
it's unlikely to happen. Putting SCSI stuff to request_queue is kinda
layer violation. So let's rename it.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Technically, the cmd_filter would be applied to other protocols though
it's unlikely to happen. Putting SCSI stuff to request_queue is kinda
layer violation. So let's rename it.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: move cmdfilter from gendisk to request_queue</title>
<updated>2008-08-27T07:50:19+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-08-16T05:10:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=abf5439370491dd6fbb4fe1a7939680d2a9bc9d4'/>
<id>abf5439370491dd6fbb4fe1a7939680d2a9bc9d4</id>
<content type='text'>
cmd_filter works only for the block layer SG_IO with SCSI block
devices. It breaks scsi/sg.c, bsg, and the block layer SG_IO with SCSI
character devices (such as st). We hit a kernel crash with them.

The problem is that cmd_filter code accesses to gendisk (having struct
blk_scsi_cmd_filter) via inode-&gt;i_bdev-&gt;bd_disk. It works for only
SCSI block device files. With character device files, inode-&gt;i_bdev
leads you to struct cdev. inode-&gt;i_bdev-&gt;bd_disk-&gt;blk_scsi_cmd_filter
isn't safe.

SCSI ULDs don't expose gendisk; they keep it private. bsg needs to be
independent on any protocols. We shouldn't change ULDs to expose their
gendisk.

This patch moves struct blk_scsi_cmd_filter from gendisk to
request_queue, a common object, which eveyone can access to.

The user interface doesn't change; users can change the filters via
/sys/block/. gendisk has a pointer to request_queue so the cmd_filter
code accesses to struct blk_scsi_cmd_filter.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cmd_filter works only for the block layer SG_IO with SCSI block
devices. It breaks scsi/sg.c, bsg, and the block layer SG_IO with SCSI
character devices (such as st). We hit a kernel crash with them.

The problem is that cmd_filter code accesses to gendisk (having struct
blk_scsi_cmd_filter) via inode-&gt;i_bdev-&gt;bd_disk. It works for only
SCSI block device files. With character device files, inode-&gt;i_bdev
leads you to struct cdev. inode-&gt;i_bdev-&gt;bd_disk-&gt;blk_scsi_cmd_filter
isn't safe.

SCSI ULDs don't expose gendisk; they keep it private. bsg needs to be
independent on any protocols. We shouldn't change ULDs to expose their
gendisk.

This patch moves struct blk_scsi_cmd_filter from gendisk to
request_queue, a common object, which eveyone can access to.

The user interface doesn't change; users can change the filters via
/sys/block/. gendisk has a pointer to request_queue so the cmd_filter
code accesses to struct blk_scsi_cmd_filter.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmdfilter: extend default read filter</title>
<updated>2008-07-03T11:21:14+00:00</updated>
<author>
<name>Adel Gadllah</name>
<email>adel.gadllah@gmail.com</email>
</author>
<published>2008-06-27T07:16:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=06a452e5b95eb669b7ad414ccf587dfc2d91b217'/>
<id>06a452e5b95eb669b7ad414ccf587dfc2d91b217</id>
<content type='text'>
This patch adds the commands that the former sg filter allowed for read
access to the cmdfilter to keep userspace apps that rely on them working.

Signed-off-by: Adel Gadllah &lt;adel.gadllah@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds the commands that the former sg filter allowed for read
access to the cmdfilter to keep userspace apps that rely on them working.

Signed-off-by: Adel Gadllah &lt;adel.gadllah@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
