- 20 4月, 2021 12 次提交
-
-
由 Guoqing Jiang 提交于
No need to have it since we can call sysfs_remove_group in the rnbd_clt_destroy_sysfs_files. Then rnbd_clt_destroy_sysfs_files is paired with it's counterpart rnbd_clt_create_sysfs_files. Signed-off-by: NGuoqing Jiang <guoqing.jiang@ionos.com> Reviewed-by: NDanil Kipnis <danil.kipnis@ionos.com> Signed-off-by: NGioh Kim <gi-oh.kim@ionos.com> Signed-off-by: NJack Wang <jinpu.wang@ionos.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Link: https://lore.kernel.org/r/20210419073722.15351-7-gi-oh.kim@ionos.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Guoqing Jiang 提交于
It makes more sense to add gendisk in rnbd_clt_setup_gen_disk, instead of do it in rnbd_clt_map_device. Signed-off-by: NGuoqing Jiang <guoqing.jiang@gmx.com> Reviewed-by: NDanil Kipnis <danil.kipnis@cloud.ionos.com> Signed-off-by: NGioh Kim <gi-oh.kim@cloud.ionos.com> Signed-off-by: NJack Wang <jinpu.wang@cloud.ionos.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Link: https://lore.kernel.org/r/20210419073722.15351-6-gi-oh.kim@ionos.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Guoqing Jiang 提交于
Remove them since both sess and idx can be dereferenced from dev. And sess is not used in the function. Signed-off-by: NGuoqing Jiang <guoqing.jiang@gmx.com> Reviewed-by: NDanil Kipnis <danil.kipnis@cloud.ionos.com> Signed-off-by: NGioh Kim <gi-oh.kim@cloud.ionos.com> Signed-off-by: NJack Wang <jinpu.wang@cloud.ionos.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Link: https://lore.kernel.org/r/20210419073722.15351-5-gi-oh.kim@ionos.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Guoqing Jiang 提交于
Remove 'pathname' and 'sess' since we can dereference it from 'dev'. Signed-off-by: NGuoqing Jiang <guoqing.jiang@gmx.com> Reviewed-by: NDanil Kipnis <danil.kipnis@cloud.ionos.com> Signed-off-by: NGioh Kim <gi-oh.kim@cloud.ionos.com> Signed-off-by: NJack Wang <jinpu.wang@cloud.ionos.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Link: https://lore.kernel.org/r/20210419073722.15351-4-gi-oh.kim@ionos.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Gioh Kim 提交于
Two sysfs entries, remap_device and resize, are missing. Signed-off-by: NGioh Kim <gi-oh.kim@cloud.ionos.com> Signed-off-by: NJack Wang <jinpu.wang@cloud.ionos.com> Link: https://lore.kernel.org/r/20210419073722.15351-3-gi-oh.kim@ionos.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Danil Kipnis 提交于
Danil steps down, Haris will take over. Also update email address to ionos.com, the old cloud.ionos.com will still work for some time. Signed-off-by: NDanil Kipnis <danil.kipnis@cloud.ionos.com> Acked-by: NMd Haris Iqbal <haris.iqbal@cloud.ionos.com> Signed-off-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NGioh Kim <gi-oh.kim@cloud.ionos.com> Link: https://lore.kernel.org/r/20210419073722.15351-2-gi-oh.kim@ionos.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Colin Ian King 提交于
The variable st is being assigned a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NDenis Efremov <efremov@linux.com> Acked-by: NWilly Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20210415130020.1959951-1-colin.king@canonical.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Denis Efremov 提交于
FLOPPY_SILENT_DCL_CLEAR is not defined anywhere and comes from pre-git era. Just drop this undef. There is FD_SILENT_DCL_CLEAR which is really used. Signed-off-by: NDenis Efremov <efremov@linux.com> Link: https://lore.kernel.org/r/20210416083449.72700-6-efremov@linux.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Denis Efremov 提交于
Use memcpy() in raw_cmd_done() to copy reply_buffer instead of a for loop. Signed-off-by: NDenis Efremov <efremov@linux.com> Link: https://lore.kernel.org/r/20210416083449.72700-5-efremov@linux.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Denis Efremov 提交于
Use memset() to zero reply buffer in raw_cmd_copyin() instead of a for loop. Signed-off-by: NDenis Efremov <efremov@linux.com> Link: https://lore.kernel.org/r/20210416083449.72700-4-efremov@linux.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Denis Efremov 提交于
Use ST0 as 0 index for reply_buffer array. get_fdc_version() is the only function that uses index 0 directly instead of the ST0 define. Signed-off-by: NDenis Efremov <efremov@linux.com> Link: https://lore.kernel.org/r/20210416083449.72700-3-efremov@linux.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Denis Efremov 提交于
Cleanup trailing whitespaces as checkpatch.pl suggests. Signed-off-by: NDenis Efremov <efremov@linux.com> Link: https://lore.kernel.org/r/20210416083449.72700-2-efremov@linux.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
- 16 4月, 2021 6 次提交
-
-
由 Jens Axboe 提交于
Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.13/drivers Pull MD updates from Song: "1. mddev_find_or_alloc() clean up, from Christoph. 2. Fix NULL pointer deref with external bitmap, from Sudhakar." * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/bitmap: wait for external bitmap writes to complete during tear down md: do not return existing mddevs from mddev_find_or_alloc md: refactor mddev_find_or_alloc md: factor out a mddev_alloc_unit helper from mddev_find
-
git://git.infradead.org/nvme由 Jens Axboe 提交于
Pull NVMe updates from Christoph: "nvme updates for Linux 5.13 - refactor the ioctl code - fix a segmentation fault during io parsing error in nvmet-tcp (Elad Grupi) - fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store (Gopal Tiwari) - properly respect the sgl_threshold flag in nvme-pci (Niklas Cassel) - misc cleanups (Niklas Cassel, Amit Engel, Minwoo Im, Colin Ian King)" * tag 'nvme-5.13-2021-04-15' of git://git.infradead.org/nvme: nvme: fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store nvme: let namespace probing continue for unsupported features nvme: factor out nvme_ns_open and nvme_ns_release helpers nvme: move nvme_ns_head_ops to multipath.c nvme: factor out a nvme_tryget_ns_head helper nvme: move the ioctl code to a separate file nvme: don't bother to look up a namespace for controller ioctls nvme: simplify block device ioctl handling for the !multipath case nvme: simplify the compat ioctl handling nvme: factor out a nvme_ns_ioctl helper nvme: pass a user pointer to nvme_nvm_ioctl nvme: cleanup setting the disk name nvme: add a nvme_ns_head_multipath helper nvme: remove single trailing whitespace nvme-multipath: remove single trailing whitespace nvme-pci: remove single trailing whitespace nvme-pci: don't simple map sgl when sgls are disabled nvmet: fix a spelling mistake "nubmer" -> "number" nvmet-fc: simplify nvmet_fc_alloc_hostport nvmet-tcp: fix a segmentation fault during io parsing error
-
由 Sudhakar Panneerselvam 提交于
NULL pointer dereference was observed in super_written() when it tries to access the mddev structure. [The below stack trace is from an older kernel, but the problem described in this patch applies to the mainline kernel.] [ 1194.474861] task: ffff8fdd20858000 task.stack: ffffb99d40790000 [ 1194.488000] RIP: 0010:super_written+0x29/0xe1 [ 1194.499688] RSP: 0018:ffff8ffb7fcc3c78 EFLAGS: 00010046 [ 1194.512477] RAX: 0000000000000000 RBX: ffff8ffb7bf4a000 RCX: ffff8ffb78991048 [ 1194.527325] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8ffb56b8a200 [ 1194.542576] RBP: ffff8ffb7fcc3c90 R08: 000000000000000b R09: 0000000000000000 [ 1194.558001] R10: ffff8ffb56b8a298 R11: 0000000000000000 R12: ffff8ffb56b8a200 [ 1194.573070] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 1194.588117] FS: 0000000000000000(0000) GS:ffff8ffb7fcc0000(0000) knlGS:0000000000000000 [ 1194.604264] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1194.617375] CR2: 00000000000002b8 CR3: 00000021e040a002 CR4: 00000000007606e0 [ 1194.632327] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1194.647865] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1194.663316] PKRU: 55555554 [ 1194.674090] Call Trace: [ 1194.683735] <IRQ> [ 1194.692948] bio_endio+0xae/0x135 [ 1194.703580] blk_update_request+0xad/0x2fa [ 1194.714990] blk_update_bidi_request+0x20/0x72 [ 1194.726578] __blk_end_bidi_request+0x2c/0x4d [ 1194.738373] __blk_end_request_all+0x31/0x49 [ 1194.749344] blk_flush_complete_seq+0x377/0x383 [ 1194.761550] flush_end_io+0x1dd/0x2a7 [ 1194.772910] blk_finish_request+0x9f/0x13c [ 1194.784544] scsi_end_request+0x180/0x25c [ 1194.796149] scsi_io_completion+0xc8/0x610 [ 1194.807503] scsi_finish_command+0xdc/0x125 [ 1194.818897] scsi_softirq_done+0x81/0xde [ 1194.830062] blk_done_softirq+0xa4/0xcc [ 1194.841008] __do_softirq+0xd9/0x29f [ 1194.851257] irq_exit+0xe6/0xeb [ 1194.861290] do_IRQ+0x59/0xe3 [ 1194.871060] common_interrupt+0x1c6/0x382 [ 1194.881988] </IRQ> [ 1194.890646] RIP: 0010:cpuidle_enter_state+0xdd/0x2a5 [ 1194.902532] RSP: 0018:ffffb99d40793e68 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff43 [ 1194.917317] RAX: ffff8ffb7fce27c0 RBX: ffff8ffb7fced800 RCX: 000000000000001f [ 1194.932056] RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000000 [ 1194.946428] RBP: ffffb99d40793ea0 R08: 0000000000000004 R09: 0000000000002ed2 [ 1194.960508] R10: 0000000000002664 R11: 0000000000000018 R12: 0000000000000003 [ 1194.974454] R13: 000000000000000b R14: ffffffff925715a0 R15: 0000011610120d5a [ 1194.988607] ? cpuidle_enter_state+0xcc/0x2a5 [ 1194.999077] cpuidle_enter+0x17/0x19 [ 1195.008395] call_cpuidle+0x23/0x3a [ 1195.017718] do_idle+0x172/0x1d5 [ 1195.026358] cpu_startup_entry+0x73/0x75 [ 1195.035769] start_secondary+0x1b9/0x20b [ 1195.044894] secondary_startup_64+0xa5/0xa5 [ 1195.084921] RIP: super_written+0x29/0xe1 RSP: ffff8ffb7fcc3c78 [ 1195.096354] CR2: 00000000000002b8 bio in the above stack is a bitmap write whose completion is invoked after the tear down sequence sets the mddev structure to NULL in rdev. During tear down, there is an attempt to flush the bitmap writes, but for external bitmaps, there is no explicit wait for all the bitmap writes to complete. For instance, md_bitmap_flush() is called to flush the bitmap writes, but the last call to md_bitmap_daemon_work() in md_bitmap_flush() could generate new bitmap writes for which there is no explicit wait to complete those writes. The call to md_bitmap_update_sb() will return simply for external bitmaps and the follow-up call to md_update_sb() is conditional and may not get called for external bitmaps. This results in a kernel panic when the completion routine, super_written() is called which tries to reference mddev in the rdev that has been set to NULL(in unbind_rdev_from_array() by tear down sequence). The solution is to call md_super_wait() for external bitmaps after the last call to md_bitmap_daemon_work() in md_bitmap_flush() to ensure there are no pending bitmap writes before proceeding with the tear down. Cc: stable@vger.kernel.org Signed-off-by: NSudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com> Reviewed-by: NZhao Heming <heming.zhao@suse.com> Signed-off-by: NSong Liu <song@kernel.org>
-
由 Christoph Hellwig 提交于
Instead of returning an existing mddev, just for it to be discarded later directly return -EEXIST. Rename the function to mddev_alloc now that it doesn't find an existing mddev. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NSong Liu <song@kernel.org>
-
由 Christoph Hellwig 提交于
Allocate the new mddev first speculatively, which greatly simplifies the code flow. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NSong Liu <song@kernel.org>
-
由 Christoph Hellwig 提交于
Split out a self contained helper to find a free minor for the md "unit" number. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NSong Liu <song@kernel.org>
-
- 15 4月, 2021 20 次提交
-
-
由 Gopal Tiwari 提交于
Adding entry for dev_attr_fast_io_fail_tmo to avoid the kernel crash while reading and writing the fast_io_fail_tmo. Fixes: 09fbed63 (nvme: export fast_io_fail_tmo to sysfs) Signed-off-by: NGopal Tiwari <gtiwari@redhat.com> Reviewed-by: NKeith Busch <kbusch@kernel.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Christoph Hellwig 提交于
Instead of failing to scan the namespace entirely when unsupported features are detected, just mark the gendisk hidden but allow other access like the upcoming per-namespace character device. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com>
-
由 Christoph Hellwig 提交于
These will be reused for the per-namespace character devices. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
-
由 Christoph Hellwig 提交于
Move the multipath block_device_operations to multipath.c, where they belong. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
-
由 Christoph Hellwig 提交于
Add a helper to avoid opencoding ns_head->ref manipulations. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com> Reviewed-by: NKanchan Joshi <joshi.k@samsung.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
-
由 Christoph Hellwig 提交于
Split out the ioctl code from core.c into a new file. Also update copyrights while we're at it. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
-
由 Christoph Hellwig 提交于
Don't bother to look up a namespace just to drop if after retreiving the controller for the multipath case. Just look up a live controller for the subsystem directly. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com>
-
由 Christoph Hellwig 提交于
Only use the existing ioctl handler for the multipath case, and add a simpler one that reverts to the pre-multipath case for not shared use case. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com>
-
由 Christoph Hellwig 提交于
Don't bother defining a separate compat_ioctl handler, and just handle the NVME_IOCTL_SUBMIT_IO32 case inline. Also only defined it for those ABIs (currently just i386 vs x86_64) that are affected. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com>
-
由 Christoph Hellwig 提交于
Factor out a helper for the namespace based ioctls. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
-
由 Christoph Hellwig 提交于
Pass the proper user pointer instead of the not all that useful integer representation. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com>
-
由 Christoph Hellwig 提交于
Return false from nvme_set_disk_name and let the caller set the non-multipath name instead of duplicating the naming information in two places. Also remove the pointless local variables for the disk name and flags and the not needed ctrl argument. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com>
-
由 Minwoo Im 提交于
Move the multipath gendisk out of #ifdef CONFIG_NVME_MULTIPATH and add a new nvme_ns_head_multipath that uses it to check if a ns_head has a multipath device associated with it. Signed-off-by: NMinwoo Im <minwoo.im.dev@gmail.com> [hch: added the IS_ENABLED, converted a few existing users] Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NKeith Busch <kbusch@kernel.org> Reviewed-by: NJavier González <javier.gonz@samsung.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
-
由 Niklas Cassel 提交于
There is a single trailing whitespace in core.c. Since this is just a single whitespace, the chances of this affecting backports to stable should be quite low, so let's just remove it. Signed-off-by: NNiklas Cassel <niklas.cassel@wdc.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Niklas Cassel 提交于
There is a single trailing whitespace in multipath.c. Since this is just a single whitespace, the chances of this affecting backports to stable should be quite low, so let's just remove it. Signed-off-by: NNiklas Cassel <niklas.cassel@wdc.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Niklas Cassel 提交于
There is a single trailing whitespace in pci.c. Since this is just a single whitespace, the chances of this affecting backports to stable should be quite low, so let's just remove it. Signed-off-by: NNiklas Cassel <niklas.cassel@wdc.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Niklas Cassel 提交于
According to the module parameter description for sgl_threshold, a value of 0 means that SGLs are disabled. If SGLs are disabled, we should respect that, even for the case where the request is made up of a single physical segment. Fixes: 29791057 ("nvme-pci: optimize mapping single segment requests using SGLs") Signed-off-by: NNiklas Cassel <niklas.cassel@wdc.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Colin Ian King 提交于
There is a spelling mistake in a pr_err error message. Fix it. Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Amit Engel 提交于
Once a host is already created, avoid allocate additional hostports that will be thrown away. add an helper function to handle host search. Reviewed-by: NHimanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: NJames Smart <jsmart2021@gmail.com> Signed-off-by: NAmit Engel <amit.engel@dell.com> Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Elad Grupi 提交于
In case there is an io that contains inline data and it goes to parsing error flow, command response will free command and iov before clearing the data on the socket buffer. This will delay the command response until receive flow is completed. Fixes: 872d26a3 ("nvmet-tcp: add NVMe over TCP target driver") Signed-off-by: NElad Grupi <elad.grupi@dell.com> Signed-off-by: NHou Pu <houpu.main@gmail.com> Reviewed-by: NSagi Grimberg <sagi@grimberg.me> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 13 4月, 2021 2 次提交
-
-
由 Christoph Hellwig 提交于
Lightnvm was an innovative idea to expose more low-level control over SSDs. But it failed to get properly standardized and remains a non-standarized extension to NVMe that requires vendor specific quirks for a few now mostly obsolete SSD devices. The standardized ZNS command set for NVMe has take over a lot of the approaches and allows for fully standardized operation. Remove the Linux code to support open channel SSDs as the few production deployments of the above mentioned SSDs are using userspace driver stacks instead of the fairly limited Linux support. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NJavier González <javier@javigon.com> Signed-off-by: NMatias Bjørling <mb@lightnvm.io> Link: https://lore.kernel.org/r/20210413105257.159260-5-matias.bjorling@wdc.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
由 Zhang Yunkai 提交于
'linux/blkdev.h' and 'uapi/linux/lightnvm.h' included in 'lightnvm.h' is duplicated.It is also included in the 5th and 7th line. Signed-off-by: NZhang Yunkai <zhang.yunkai@zte.com.cn> Signed-off-by: NMatias Bjørling <matias.bjorling@wdc.com> Link: https://lore.kernel.org/r/20210413105257.159260-4-matias.bjorling@wdc.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-