OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86d7182
)
target/file: Set is_nonrot attribute
author
Asias He
<asias@redhat.com>
Thu, 25 Apr 2013 02:38:11 +0000
(19:38 -0700)
committer
Nicholas Bellinger
<nab@linux-iscsi.org>
Thu, 25 Apr 2013 08:05:25 +0000
(
01:05
-0700)
Set is_nonrot attribute according to the block queue if the backend
device is a block device.
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_file.c
patch
|
blob
|
history
diff --git
a/drivers/target/target_core_file.c
b/drivers/target/target_core_file.c
index
9063c31
..
58ed683
100644
(file)
--- a/
drivers/target/target_core_file.c
+++ b/
drivers/target/target_core_file.c
@@
-192,6
+192,9
@@
static int fd_configure_device(struct se_device *dev)
* the smaller WRITE_SAME(10) only has a two-byte block count.
*/
dev->dev_attrib.max_write_same_len = 0xFFFF;
+
+ if (blk_queue_nonrot(q))
+ dev->dev_attrib.is_nonrot = 1;
} else {
if (!(fd_dev->fbd_flags & FBDF_HAS_SIZE)) {
pr_err("FILEIO: Missing fd_dev_size="