-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libnvdimm: infrastructure for btt devices
NVDIMM namespaces, in addition to accepting "struct bio" based requests, also have the capability to perform byte-aligned accesses. By default only the bio/block interface is used. However, if another driver can make effective use of the byte-aligned capability it can claim namespace interface and use the byte-aligned ->rw_bytes() interface. The BTT driver is the initial first consumer of this mechanism to allow adding atomic sector update semantics to a pmem or blk namespace. This patch is the sysfs infrastructure to allow configuring a BTT instance for a namespace. Enabling that BTT and performing i/o is in a subsequent patch. Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
- Loading branch information
Dan Williams
committed
Jun 25, 2015
1 parent
0ba1c63
commit 8c2f7e8
Showing
13 changed files
with
879 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,7 @@ config BLK_DEV_PMEM | |
|
||
Say Y if you want to use an NVDIMM | ||
|
||
config BTT | ||
def_bool y | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Block Translation Table library | ||
* Copyright (c) 2014-2015, Intel Corporation. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms and conditions of the GNU General Public License, | ||
* version 2, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
*/ | ||
|
||
#ifndef _LINUX_BTT_H | ||
#define _LINUX_BTT_H | ||
|
||
#include <linux/types.h> | ||
|
||
#define BTT_SIG_LEN 16 | ||
#define BTT_SIG "BTT_ARENA_INFO\0" | ||
|
||
struct btt_sb { | ||
u8 signature[BTT_SIG_LEN]; | ||
u8 uuid[16]; | ||
u8 parent_uuid[16]; | ||
__le32 flags; | ||
__le16 version_major; | ||
__le16 version_minor; | ||
__le32 external_lbasize; | ||
__le32 external_nlba; | ||
__le32 internal_lbasize; | ||
__le32 internal_nlba; | ||
__le32 nfree; | ||
__le32 infosize; | ||
__le64 nextoff; | ||
__le64 dataoff; | ||
__le64 mapoff; | ||
__le64 logoff; | ||
__le64 info2off; | ||
u8 padding[3968]; | ||
__le64 checksum; | ||
}; | ||
|
||
#endif |
Oops, something went wrong.