summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorAdel Gadllah <adel.gadllah@gmail.com>2008-06-27 09:16:17 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-07-03 13:21:14 +0200
commit06a452e5b95eb669b7ad414ccf587dfc2d91b217 (patch)
tree44675dae6a98b414dc3d7778ef8a74da00fee92a /block
parent2b272d4f7953a73ea1c1f7ba33d5a2d7439ce71b (diff)
downloadlinux-06a452e5b95eb669b7ad414ccf587dfc2d91b217.tar.gz
linux-06a452e5b95eb669b7ad414ccf587dfc2d91b217.tar.bz2
linux-06a452e5b95eb669b7ad414ccf587dfc2d91b217.zip
cmdfilter: extend default read filter
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 <adel.gadllah@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/cmd-filter.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/block/cmd-filter.c b/block/cmd-filter.c
index 35e327ceaa97..eec4404fd357 100644
--- a/block/cmd-filter.c
+++ b/block/cmd-filter.c
@@ -219,6 +219,10 @@ static struct kobj_type rcf_ktype = {
.default_attrs = default_attrs,
};
+#ifndef MAINTENANCE_IN_CMD
+#define MAINTENANCE_IN_CMD 0xa3
+#endif
+
static void rcf_set_defaults(struct blk_scsi_cmd_filter *filter)
{
/* Basic read-only commands */
@@ -230,6 +234,7 @@ static void rcf_set_defaults(struct blk_scsi_cmd_filter *filter)
__set_bit(READ_16, filter->read_ok);
__set_bit(READ_BUFFER, filter->read_ok);
__set_bit(READ_DEFECT_DATA, filter->read_ok);
+ __set_bit(READ_CAPACITY, filter->read_ok);
__set_bit(READ_LONG, filter->read_ok);
__set_bit(INQUIRY, filter->read_ok);
__set_bit(MODE_SENSE, filter->read_ok);
@@ -238,6 +243,10 @@ static void rcf_set_defaults(struct blk_scsi_cmd_filter *filter)
__set_bit(START_STOP, filter->read_ok);
__set_bit(GPCMD_VERIFY_10, filter->read_ok);
__set_bit(VERIFY_16, filter->read_ok);
+ __set_bit(REPORT_LUNS, filter->read_ok);
+ __set_bit(SERVICE_ACTION_IN, filter->read_ok);
+ __set_bit(RECEIVE_DIAGNOSTIC, filter->read_ok);
+ __set_bit(MAINTENANCE_IN_CMD, filter->read_ok);
__set_bit(GPCMD_READ_BUFFER_CAPACITY, filter->read_ok);
/* Audio CD commands */