Re: Persistent memory interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 19, 2015 at 9:33 AM, Mikulas Patocka <mpatocka@xxxxxxxxxx> wrote:
> Hi
>
> I looked at the new the persistent memory block device driver
> (drivers/block/pmem.c and arch/x86/kernel/pmem.c) and it seems that the
> interface between them is incorrect.
>
> If I want to use persistent memory in another driver, for a different
> purpose, how can I make sure that that drivers/block/pmem.c doesn't attach
> to this piece of memory and export it? It seems not possible.
> drivers/block/pmem.c attaches to everything without regard that there may
> be other users of persistent memory.

Simply partition the pmem device however you see fit and then
blkdev_get_by_path(<dev>, FMODE_EXCL, <holder>) the resulting
partition(s).

See the BTT infrastructure for how to autodetect and re-assemble this
allocation at sub-system init time:

https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/tree/drivers/nvdimm/btt_devs.c?h=libnvdimm-pending#n450

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux