Skip to content

Commit

Permalink
null_blk: suppress invalid partition info
Browse files Browse the repository at this point in the history
null_blk is partitionable, but it doesn't store any of the info. When
it is loaded, you would normally see:

[1226739.343608]  nullb0: unknown partition table
[1226739.343746]  nullb1: unknown partition table

which can confuse some people. Add the appropriate gendisk flag
to suppress this info.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Jan 16, 2015
1 parent c8fa317 commit 227290b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/null_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ static int null_add_dev(void)
sector_div(size, bs);
set_capacity(disk, size);

disk->flags |= GENHD_FL_EXT_DEVT;
disk->flags |= GENHD_FL_EXT_DEVT | GENHD_FL_SUPPRESS_PARTITION_INFO;
disk->major = null_major;
disk->first_minor = nullb->index;
disk->fops = &null_fops;
Expand Down

0 comments on commit 227290b

Please sign in to comment.