[PATCH] cpuset: Modify the type of use_parent_ecpus from int to bool

2021-03-12 Thread Li Feng
Since the use_parent_ecpus in cpuset is only used as bool type, change the type from int to bool. Signed-off-by: Li Feng --- kernel/cgroup/cpuset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 5258b68153e0

Re: [PATCH] nvme: reject the ns when the block size is smaller than a sector

2021-01-14 Thread Li Feng
Christoph Hellwig 于2021年1月15日周五 上午1:43写道: > > On Wed, Jan 13, 2021 at 02:12:59PM -0800, Sagi Grimberg wrote: > >> But this only catches a physical block size < 512 for NVMe, not any other > >> block device. > >> > >> Please fix it for the general case in blk_queue_physical_block_size(). > > > >

[PATCH] nvme: reject the ns when the block size is smaller than a sector

2021-01-13 Thread Li Feng
The nvme spec(1.4a, figure 248) says: "A value smaller than 9 (i.e., 512 bytes) is not supported." Signed-off-by: Li Feng --- drivers/nvme/host/core.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index f320273fc672..1f

[PATCH] cgroup: Remove stale comments

2021-01-12 Thread Li Feng
The function "cgroup_mount" had beed removed, remove related comments to prevent confusion. Related commit:90129625d9203a917f(cgroup: start switching to fs_context) Signed-off-by: Li Feng --- kernel/cgroup/cgroup.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/cgroup/

Re: [PATCH v2] blk: avoid divide-by-zero with zero granularity

2021-01-12 Thread Li Feng
Yes, Reject the device is the right fix. I will try to send another fix. By the way, I think this fix is good protection, maybe some other devices violate this block size constraint. Divide zero is unacceptable. Thanks, Feng Li Martin K. Petersen 于2021年1月13日周三 上午1:48写道: > > > Johannes, > > >>

[PATCH v2] blk: avoid divide-by-zero with zero granularity

2021-01-12 Thread Li Feng
If the physical_block_size and io_min is less than a sector, the 'granularity >> SECTOR_SHIFT' will be zero. Signed-off-by: Li Feng --- include/linux/blkdev.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h

[PATCH] blk: avoid divide-by-zero with zero granularity

2021-01-12 Thread Li Feng
If the physical_block_size and io_min is less than a sector, the 'granularity >> SECTOR_SHIFT' will be zero. Signed-off-by: Li Feng --- include/linux/blkdev.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index f94ee3089e01..4d029e

hwclock make clock_gettime not accurate

2017-03-15 Thread li feng
HI guys. I'm doing some tests about clock_gettime. And I found that clock_gettime will be affected by hwclock. It makes clock_gettime slip advance some milliseconds. Actually, each line prints out every 1ms. $ ./a.out -r CLOCK_MONOTONIC 130 ↵ Using delay=1 ms

hwclock make clock_gettime not accurate

2017-03-15 Thread li feng
HI guys. I'm doing some tests about clock_gettime. And I found that clock_gettime will be affected by hwclock. It makes clock_gettime slip advance some milliseconds. Actually, each line prints out every 1ms. $ ./a.out -r CLOCK_MONOTONIC 130 ↵ Using delay=1 ms