You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
nbd: replace some printk with dev_warn() and dev_info()
Signed-off-by: WANG Cong <amwang@redhat.com> Cc: Paul Clements <Paul.Clements@steeleye.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
This commit is contained in:
+5
-6
@@ -127,8 +127,7 @@ static void sock_shutdown(struct nbd_device *lo, int lock)
|
|||||||
if (lock)
|
if (lock)
|
||||||
mutex_lock(&lo->tx_lock);
|
mutex_lock(&lo->tx_lock);
|
||||||
if (lo->sock) {
|
if (lo->sock) {
|
||||||
printk(KERN_WARNING "%s: shutting down socket\n",
|
dev_warn(disk_to_dev(lo->disk), "shutting down socket\n");
|
||||||
lo->disk->disk_name);
|
|
||||||
kernel_sock_shutdown(lo->sock, SHUT_RDWR);
|
kernel_sock_shutdown(lo->sock, SHUT_RDWR);
|
||||||
lo->sock = NULL;
|
lo->sock = NULL;
|
||||||
}
|
}
|
||||||
@@ -576,7 +575,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *lo,
|
|||||||
case NBD_DISCONNECT: {
|
case NBD_DISCONNECT: {
|
||||||
struct request sreq;
|
struct request sreq;
|
||||||
|
|
||||||
printk(KERN_INFO "%s: NBD_DISCONNECT\n", lo->disk->disk_name);
|
dev_info(disk_to_dev(lo->disk), "NBD_DISCONNECT\n");
|
||||||
|
|
||||||
blk_rq_init(NULL, &sreq);
|
blk_rq_init(NULL, &sreq);
|
||||||
sreq.cmd_type = REQ_TYPE_SPECIAL;
|
sreq.cmd_type = REQ_TYPE_SPECIAL;
|
||||||
@@ -674,7 +673,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *lo,
|
|||||||
file = lo->file;
|
file = lo->file;
|
||||||
lo->file = NULL;
|
lo->file = NULL;
|
||||||
nbd_clear_que(lo);
|
nbd_clear_que(lo);
|
||||||
printk(KERN_WARNING "%s: queue cleared\n", lo->disk->disk_name);
|
dev_warn(disk_to_dev(lo->disk), "queue cleared\n");
|
||||||
if (file)
|
if (file)
|
||||||
fput(file);
|
fput(file);
|
||||||
lo->bytesize = 0;
|
lo->bytesize = 0;
|
||||||
@@ -694,8 +693,8 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *lo,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case NBD_PRINT_DEBUG:
|
case NBD_PRINT_DEBUG:
|
||||||
printk(KERN_INFO "%s: next = %p, prev = %p, head = %p\n",
|
dev_info(disk_to_dev(lo->disk),
|
||||||
bdev->bd_disk->disk_name,
|
"next = %p, prev = %p, head = %p\n",
|
||||||
lo->queue_head.next, lo->queue_head.prev,
|
lo->queue_head.next, lo->queue_head.prev,
|
||||||
&lo->queue_head);
|
&lo->queue_head);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user