mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-21 06:36:27 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
+18
-15
@@ -348,6 +348,24 @@ static inline int __must_check kref_get_unless_zero(struct kref *kref)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* <linux/ktime.h> */
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) && \
|
||||
LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)) && \
|
||||
(!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7)
|
||||
/**
|
||||
* ktime_before - Compare if a ktime_t value is smaller than another one.
|
||||
* @cmp1: comparable1
|
||||
* @cmp2: comparable2
|
||||
*
|
||||
* Return: true if cmp1 happened before cmp2.
|
||||
*/
|
||||
static inline bool ktime_before(const ktime_t cmp1, const ktime_t cmp2)
|
||||
{
|
||||
return ktime_compare(cmp1, cmp2) < 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* <linux/list.h> */
|
||||
|
||||
#ifndef __list_for_each
|
||||
@@ -678,19 +696,4 @@ static inline int scsi_bidi_cmnd(struct scsi_cmnd *cmd)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)) && \
|
||||
(LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0))
|
||||
/**
|
||||
* ktime_before - Compare if a ktime_t value is smaller than another one.
|
||||
* @cmp1: comparable1
|
||||
* @cmp2: comparable2
|
||||
*
|
||||
* Return: true if cmp1 happened before cmp2.
|
||||
*/
|
||||
static inline bool ktime_before(const ktime_t cmp1, const ktime_t cmp2)
|
||||
{
|
||||
return ktime_compare(cmp1, cmp2) < 0;
|
||||
}
|
||||
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)) */
|
||||
|
||||
#endif /* _SCST_BACKPORT_H_ */
|
||||
|
||||
@@ -631,6 +631,7 @@ static const struct attribute *vdisk_nullio_attrs[] = {
|
||||
&vdev_dummy_attr.attr,
|
||||
&vdev_read_zero_attr.attr,
|
||||
&vdisk_removable_attr.attr,
|
||||
&vdisk_cluster_mode_attr.attr,
|
||||
&vdev_t10_vend_id_attr.attr,
|
||||
&vdev_vend_specific_id_attr.attr,
|
||||
&vdev_prod_id_attr.attr,
|
||||
@@ -831,6 +832,7 @@ static struct scst_dev_type vdisk_null_devtype = {
|
||||
"dif_mode, "
|
||||
"dif_type, "
|
||||
"dif_static_app_tag, ",
|
||||
"cluster_mode, "
|
||||
"read_only, "
|
||||
"removable, "
|
||||
"rotational, "
|
||||
@@ -8180,7 +8182,7 @@ static int vdev_nullio_add_device(const char *device_name, char *params)
|
||||
int res = 0;
|
||||
static const char *const allowed_params[] = {
|
||||
"read_only", "dummy", "removable", "blocksize", "rotational",
|
||||
"dif_mode", "dif_type", "dif_static_app_tag",
|
||||
"cluster_mode", "dif_mode", "dif_type", "dif_static_app_tag",
|
||||
"size", "size_mb", "tst", NULL
|
||||
};
|
||||
struct scst_vdisk_dev *virt_dev;
|
||||
|
||||
@@ -2191,7 +2191,7 @@ static int scst_process_ini_group_mgmt_store(char *buffer,
|
||||
TRACE_DBG("Creating group '%s'", p);
|
||||
if (acg != NULL) {
|
||||
PRINT_ERROR("acg name %s exist", p);
|
||||
res = -EINVAL;
|
||||
res = -EEXIST;
|
||||
goto out_unlock;
|
||||
}
|
||||
res = scst_alloc_add_acg(tgt, p, true, &acg);
|
||||
|
||||
Reference in New Issue
Block a user