Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bfedd1d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull followup block layer updates from Jens Axboe:
 "Two things in this pull request:

   - A block throttle oops fix (marked for stable) from Thadeu.

   - The NVMe fixes/features queued up for 3.20, but merged later in the
     process.  From Keith.  We should have gotten this merged earlier,
     we're ironing out the kinks in the process.  Will be ready for the
     initial pull next series"

* 'for-linus' of git://git.kernel.dk/linux-block:
  blk-throttle: check stats_cpu before reading it from sysfs
  NVMe: Fix potential corruption on sync commands
  NVMe: Remove unused variables
  NVMe: Fix scsi mode select llbaa setting
  NVMe: Fix potential corruption during shutdown
  NVMe: Asynchronous controller probe
  NVMe: Register management handle under nvme class
  NVMe: Update SCSI Inquiry VPD 83h translation
  NVMe: Metadata format support
parents a911dcdb decf6d79
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1292,6 +1292,9 @@ static u64 tg_prfill_cpu_rwstat(struct seq_file *sf,
	struct blkg_rwstat rwstat = { }, tmp;
	struct blkg_rwstat rwstat = { }, tmp;
	int i, cpu;
	int i, cpu;


	if (tg->stats_cpu == NULL)
		return 0;

	for_each_possible_cpu(cpu) {
	for_each_possible_cpu(cpu) {
		struct tg_stats_cpu *sc = per_cpu_ptr(tg->stats_cpu, cpu);
		struct tg_stats_cpu *sc = per_cpu_ptr(tg->stats_cpu, cpu);


+331 −165

File changed.

Preview size limit exceeded, changes collapsed.

+54 −42

File changed.

Preview size limit exceeded, changes collapsed.

+4 −5
Original line number Original line Diff line number Diff line
@@ -17,7 +17,6 @@


#include <uapi/linux/nvme.h>
#include <uapi/linux/nvme.h>
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/miscdevice.h>
#include <linux/kref.h>
#include <linux/kref.h>
#include <linux/blk-mq.h>
#include <linux/blk-mq.h>


@@ -62,8 +61,6 @@ enum {
	NVME_CSTS_SHST_MASK	= 3 << 2,
	NVME_CSTS_SHST_MASK	= 3 << 2,
};
};


#define NVME_VS(major, minor)	(major << 16 | minor)

extern unsigned char nvme_io_timeout;
extern unsigned char nvme_io_timeout;
#define NVME_IO_TIMEOUT	(nvme_io_timeout * HZ)
#define NVME_IO_TIMEOUT	(nvme_io_timeout * HZ)


@@ -91,9 +88,10 @@ struct nvme_dev {
	struct nvme_bar __iomem *bar;
	struct nvme_bar __iomem *bar;
	struct list_head namespaces;
	struct list_head namespaces;
	struct kref kref;
	struct kref kref;
	struct miscdevice miscdev;
	struct device *device;
	work_func_t reset_workfn;
	work_func_t reset_workfn;
	struct work_struct reset_work;
	struct work_struct reset_work;
	struct work_struct probe_work;
	char name[12];
	char name[12];
	char serial[20];
	char serial[20];
	char model[40];
	char model[40];
@@ -105,7 +103,6 @@ struct nvme_dev {
	u16 abort_limit;
	u16 abort_limit;
	u8 event_limit;
	u8 event_limit;
	u8 vwc;
	u8 vwc;
	u8 initialized;
};
};


/*
/*
@@ -121,6 +118,7 @@ struct nvme_ns {
	unsigned ns_id;
	unsigned ns_id;
	int lba_shift;
	int lba_shift;
	int ms;
	int ms;
	int pi_type;
	u64 mode_select_num_blocks;
	u64 mode_select_num_blocks;
	u32 mode_select_block_len;
	u32 mode_select_block_len;
};
};
@@ -138,6 +136,7 @@ struct nvme_iod {
	int nents;		/* Used in scatterlist */
	int nents;		/* Used in scatterlist */
	int length;		/* Of data, in bytes */
	int length;		/* Of data, in bytes */
	dma_addr_t first_dma;
	dma_addr_t first_dma;
	struct scatterlist meta_sg[1]; /* metadata requires single contiguous buffer */
	struct scatterlist sg[0];
	struct scatterlist sg[0];
};
};


+25 −1
Original line number Original line Diff line number Diff line
@@ -115,7 +115,13 @@ struct nvme_id_ns {
	__le16			nawun;
	__le16			nawun;
	__le16			nawupf;
	__le16			nawupf;
	__le16			nacwu;
	__le16			nacwu;
	__u8			rsvd40[80];
	__le16			nabsn;
	__le16			nabo;
	__le16			nabspf;
	__u16			rsvd46;
	__le64			nvmcap[2];
	__u8			rsvd64[40];
	__u8			nguid[16];
	__u8			eui64[8];
	__u8			eui64[8];
	struct nvme_lbaf	lbaf[16];
	struct nvme_lbaf	lbaf[16];
	__u8			rsvd192[192];
	__u8			rsvd192[192];
@@ -124,10 +130,22 @@ struct nvme_id_ns {


enum {
enum {
	NVME_NS_FEAT_THIN	= 1 << 0,
	NVME_NS_FEAT_THIN	= 1 << 0,
	NVME_NS_FLBAS_LBA_MASK	= 0xf,
	NVME_NS_FLBAS_META_EXT	= 0x10,
	NVME_LBAF_RP_BEST	= 0,
	NVME_LBAF_RP_BEST	= 0,
	NVME_LBAF_RP_BETTER	= 1,
	NVME_LBAF_RP_BETTER	= 1,
	NVME_LBAF_RP_GOOD	= 2,
	NVME_LBAF_RP_GOOD	= 2,
	NVME_LBAF_RP_DEGRADED	= 3,
	NVME_LBAF_RP_DEGRADED	= 3,
	NVME_NS_DPC_PI_LAST	= 1 << 4,
	NVME_NS_DPC_PI_FIRST	= 1 << 3,
	NVME_NS_DPC_PI_TYPE3	= 1 << 2,
	NVME_NS_DPC_PI_TYPE2	= 1 << 1,
	NVME_NS_DPC_PI_TYPE1	= 1 << 0,
	NVME_NS_DPS_PI_FIRST	= 1 << 3,
	NVME_NS_DPS_PI_MASK	= 0x7,
	NVME_NS_DPS_PI_TYPE1	= 1,
	NVME_NS_DPS_PI_TYPE2	= 2,
	NVME_NS_DPS_PI_TYPE3	= 3,
};
};


struct nvme_smart_log {
struct nvme_smart_log {
@@ -261,6 +279,10 @@ enum {
	NVME_RW_DSM_LATENCY_LOW		= 3 << 4,
	NVME_RW_DSM_LATENCY_LOW		= 3 << 4,
	NVME_RW_DSM_SEQ_REQ		= 1 << 6,
	NVME_RW_DSM_SEQ_REQ		= 1 << 6,
	NVME_RW_DSM_COMPRESSED		= 1 << 7,
	NVME_RW_DSM_COMPRESSED		= 1 << 7,
	NVME_RW_PRINFO_PRCHK_REF	= 1 << 10,
	NVME_RW_PRINFO_PRCHK_APP	= 1 << 11,
	NVME_RW_PRINFO_PRCHK_GUARD	= 1 << 12,
	NVME_RW_PRINFO_PRACT		= 1 << 13,
};
};


struct nvme_dsm_cmd {
struct nvme_dsm_cmd {
@@ -549,6 +571,8 @@ struct nvme_passthru_cmd {
	__u32	result;
	__u32	result;
};
};


#define NVME_VS(major, minor) (((major) << 16) | ((minor) << 8))

#define nvme_admin_cmd nvme_passthru_cmd
#define nvme_admin_cmd nvme_passthru_cmd


#define NVME_IOCTL_ID		_IO('N', 0x40)
#define NVME_IOCTL_ID		_IO('N', 0x40)