lkml.org 
[lkml]   [2020]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 8/9] pstore/blk: use the normal block device I/O path
On Sun, Nov 08, 2020 at 10:43:29PM +0800, 廖威雄 wrote:
> > + const char devname[] = "/dev/pstore-blk";
> > + dev_t dev = name_to_dev_t(blkdev);
> > +
> > + if (!dev)
> > + return;
> > + init_unlink(devname);
> > + init_mknod(devname, S_IFBLK | 0600, new_encode_dev(dev));
> > + __pstore_blk_init(devname);
>
> How about pstore/blk making /dev/pstore-blk node no matter build-in
> or module. Then pstore/blk always opens /dev/pstore-blk. By this way,
> blkdev can also be a device number if pstore/blk built as a module.

Please read the comment above blkdev_get_by_dev on why no one should
add new interfaces based on the device number.

\
 
 \ /
  Last update: 2020-11-23 15:53    [W:0.068 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site