linux/drivers/nvdimm/pfn.h
<<
>>
Prefs
   1/*
   2 * Copyright (c) 2014-2015, Intel Corporation.
   3 *
   4 * This program is free software; you can redistribute it and/or modify it
   5 * under the terms and conditions of the GNU General Public License,
   6 * version 2, as published by the Free Software Foundation.
   7 *
   8 * This program is distributed in the hope it will be useful, but WITHOUT
   9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  11 * more details.
  12 */
  13
  14#ifndef __NVDIMM_PFN_H
  15#define __NVDIMM_PFN_H
  16
  17#include <linux/types.h>
  18#include <linux/mmzone.h>
  19
  20#define PFN_SIG_LEN 16
  21#define PFN_SIG "NVDIMM_PFN_INFO\0"
  22#define DAX_SIG "NVDIMM_DAX_INFO\0"
  23
  24struct nd_pfn_sb {
  25        u8 signature[PFN_SIG_LEN];
  26        u8 uuid[16];
  27        u8 parent_uuid[16];
  28        __le32 flags;
  29        __le16 version_major;
  30        __le16 version_minor;
  31        __le64 dataoff; /* relative to namespace_base + start_pad */
  32        __le64 npfns;
  33        __le32 mode;
  34        /* minor-version-1 additions for section alignment */
  35        /**
  36         * @start_pad: Deprecated attribute to pad start-misaligned namespaces
  37         *
  38         * start_pad is deprecated because the original definition did
  39         * not comprehend that dataoff is relative to the base address
  40         * of the namespace not the start_pad adjusted base. The result
  41         * is that the dax path is broken, but the block-I/O path is
  42         * not. The kernel will no longer create namespaces using start
  43         * padding, but it still supports block-I/O for legacy
  44         * configurations mainly to allow a backup, reconfigure the
  45         * namespace, and restore flow to repair dax operation.
  46         */
  47        __le32 start_pad;
  48        __le32 end_trunc;
  49        /* minor-version-2 record the base alignment of the mapping */
  50        __le32 align;
  51        /* minor-version-3 guarantee the padding and flags are zero */
  52        /* minor-version-4 record the page size and struct page size */
  53        __le32 page_size;
  54        __le16 page_struct_size;
  55        u8 padding[3994];
  56        __le64 checksum;
  57};
  58
  59#endif /* __NVDIMM_PFN_H */
  60