On 1/23/25 17:14, Andrey Zhadchenko wrote:
On 1/23/25 09:05, Pavel Tikhomirov wrote:
General comment:
Do we need a restriction on maximum amount of cbts? E.g. in next patch
we allow to read cbts list from userspace, if we have to many cbts it
can be not so trivial to allocate proper buffe
On 1/22/25 19:29, Andrey Zhadchenko wrote:
On 1/22/25 12:14, Pavel Tikhomirov wrote:
On 1/22/25 19:05, Andrey Zhadchenko wrote:
On 1/22/25 11:51, Pavel Tikhomirov wrote:
+static struct cbt_info *blk_cbt_find(struct request_queue *q, __u8
*name)
+{
+ struct cbt_info *cbt;
+
+ lis
+static int cbt_ioc_stop(struct block_device *bdev, struct blk_user_cbt_info
__user *ucbt_ioc)
+{
+ struct blk_user_cbt_info ci;
struct request_queue *q;
+ struct cbt_info *cbt;
+
+ if (copy_from_user(&ci, ucbt_ioc, sizeof(ci)))
+ return -EFAULT;
m
On 1/23/25 09:05, Pavel Tikhomirov wrote:
General comment:
Do we need a restriction on maximum amount of cbts? E.g. in next patch
we allow to read cbts list from userspace, if we have to many cbts it
can be not so trivial to allocate proper buffer to get them all at once.
Currently userspa
static int cbt_ioc_init(struct block_device *bdev, struct blk_user_cbt_info
__user *ucbt_ioc)
@@ -632,16 +633,13 @@ static int cbt_ioc_init(struct block_device *bdev, struct
blk_user_cbt_info __us
q = bdev_get_queue(bdev);
mutex_lock(&cbt_mutex);
- if (q->cbt) {
-
General comment:
Do we need a restriction on maximum amount of cbts? E.g. in next patch
we allow to read cbts list from userspace, if we have to many cbts it
can be not so trivial to allocate proper buffer to get them all at once.
On 1/20/25 16:34, Andrey Zhadchenko wrote:
Store cbts in a li
On 1/22/25 12:14, Pavel Tikhomirov wrote:
On 1/22/25 19:05, Andrey Zhadchenko wrote:
On 1/22/25 11:51, Pavel Tikhomirov wrote:
+static struct cbt_info *blk_cbt_find(struct request_queue *q, __u8
*name)
+{
+ struct cbt_info *cbt;
+
+ list_for_each_entry(cbt, &q->cbt_list, list)
+
On 1/22/25 19:05, Andrey Zhadchenko wrote:
On 1/22/25 11:51, Pavel Tikhomirov wrote:
+static struct cbt_info *blk_cbt_find(struct request_queue *q, __u8
*name)
+{
+ struct cbt_info *cbt;
+
+ list_for_each_entry(cbt, &q->cbt_list, list)
+ if (!memcmp(name, cbt->name, CBT_NAME_LE
On 1/22/25 11:51, Pavel Tikhomirov wrote:
+static struct cbt_info *blk_cbt_find(struct request_queue *q, __u8
*name)
+{
+ struct cbt_info *cbt;
+
+ list_for_each_entry(cbt, &q->cbt_list, list)
+ if (!memcmp(name, cbt->name, CBT_NAME_LENGTH))
+ return cbt;
+
+ return
+static struct cbt_info *blk_cbt_find(struct request_queue *q, __u8 *name)
+{
+ struct cbt_info *cbt;
+
+ list_for_each_entry(cbt, &q->cbt_list, list)
+ if (!memcmp(name, cbt->name, CBT_NAME_LENGTH))
+ return cbt;
+
+ return NULL;
+}
+
static
@@ -272,6 +275,7 @@ static struct cbt_info *do_cbt_alloc(struct request_queue
*q, __u8 *name,
if (!cbt)
return ERR_PTR(-ENOMEM);
+ INIT_LIST_HEAD(&cbt->list);
This initialization is excess, it is only required for a list_head we
add TO, the added list_head can be
Store cbts in a list instead of a single pointer.
Update all APIs to work with user-specified bitmap.
https://virtuozzo.atlassian.net/browse/VSTOR-96269
Signed-off-by: Andrey Zhadchenko
---
block/blk-cbt.c | 174 +---
block/blk-core.c| 2 +
i
12 matches
Mail list logo