From: Jingbo Xu <[email protected]>
To: Ferry Meng <[email protected]>,
"Michael S . Tsirkin" <[email protected]>,
Jason Wang <[email protected]>,
[email protected], Jens Axboe <[email protected]>,
[email protected]
Cc: [email protected], [email protected],
Stefan Hajnoczi <[email protected]>,
Christoph Hellwig <[email protected]>,
Joseph Qi <[email protected]>
Subject: Re: [PATCH v1 1/3] virtio-blk: add virtio-blk chardev support.
Date: Tue, 7 Jan 2025 12:53:24 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 12/18/24 5:24 PM, Ferry Meng wrote:
> +static int virtblk_cdev_add(struct virtio_blk *vblk,
> + const struct file_operations *fops)
@fops argument is not necessary, as currently virtblk_chr_fops is the
only valid value.
> @@ -1690,7 +1770,9 @@ static void __exit virtio_blk_fini(void)
> {
> unregister_virtio_driver(&virtio_blk);
> unregister_blkdev(major, "virtblk");
> + unregister_chrdev_region(vd_chr_devt, VIRTBLK_MINORS);
Better to call "unregister_chrdev_region(vd_chr_devt, VIRTBLK_MINORS)"
before "unregister_blkdev(major, "virtblk")" to follow the convention
that the order of the cleanup routine is exactly the reverse of that of
the init routine.
> destroy_workqueue(virtblk_wq);
> + ida_destroy(&vd_chr_minor_ida);
> }
> module_init(virtio_blk_init);
> module_exit(virtio_blk_fini);
--
Thanks,
Jingbo
next prev parent reply other threads:[~2025-01-07 4:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 9:24 [PATCH v1 0/3] virtio-blk: add io_uring passthrough support Ferry Meng
2024-12-18 9:24 ` [PATCH v1 1/3] virtio-blk: add virtio-blk chardev support Ferry Meng
2024-12-30 7:47 ` Joseph Qi
2025-01-07 4:53 ` Jingbo Xu [this message]
2024-12-18 9:24 ` [PATCH v1 2/3] virtio-blk: add uring_cmd support for I/O passthru on chardev Ferry Meng
2024-12-30 8:00 ` Joseph Qi
2025-01-07 13:14 ` lizetao
2024-12-18 9:24 ` [PATCH v1 3/3] virtio-blk: add uring_cmd iopoll support Ferry Meng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1356e5b9-44f0-4ccb-9e82-48c924495b93@linux.alibaba.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox