Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull block fixes from Jens Axboe:

- Remove references to old schedulers for the scheduler switching and
blkio controller documentation (Andreas)

- Kill duplicate check for report zone for null_blk (Chaitanya)

- Two bcache fixes (Coly)

- Ensure that mq-deadline is selected if zoned block device is enabled,
as we need that to support them (Damien)

- Fix io_uring memory leak (Eric)

- ps3vram fallout from LBDAF removal (Geert)

- Redundant blk-mq debugfs debugfs_create return check cleanup (Greg)

- Extend NOPLM quirk for ST1000LM024 drives (Hans)

- Remove error path warning that can now trigger after the queue
removal/addition fixes (Ming)

* tag 'for-linus-20190614' of git://git.kernel.dk/linux-block:
block/ps3vram: Use %llu to format sector_t after LBDAF removal
libata: Extend quirks for the ST1000LM024 drives with NOLPM quirk
bcache: only set BCACHE_DEV_WB_RUNNING when cached device attached
bcache: fix stack corruption by PRECEDING_KEY()
blk-mq: remove WARN_ON(!q->elevator) from blk_mq_sched_free_requests
blkio-controller.txt: Remove references to CFQ
block/switching-sched.txt: Update to blk-mq schedulers
null_blk: remove duplicate check for report zone
blk-mq: no need to check return value of debugfs_create functions
io_uring: fix memory leak of UNIX domain socket inode
block: force select mq-deadline for zoned block devices

+114 -259
+8 -10
Documentation/block/switching-sched.txt
··· 13 13 14 14 # mount none /sys -t sysfs 15 15 16 - As of the Linux 2.6.10 kernel, it is now possible to change the 17 - IO scheduler for a given block device on the fly (thus making it possible, 18 - for instance, to set the CFQ scheduler for the system default, but 19 - set a specific device to use the deadline or noop schedulers - which 20 - can improve that device's throughput). 16 + It is possible to change the IO scheduler for a given block device on 17 + the fly to select one of mq-deadline, none, bfq, or kyber schedulers - 18 + which can improve that device's throughput. 21 19 22 20 To set a specific scheduler, simply do this: 23 21 ··· 28 30 a "cat /sys/block/DEV/queue/scheduler" - the list of valid names 29 31 will be displayed, with the currently selected scheduler in brackets: 30 32 31 - # cat /sys/block/hda/queue/scheduler 32 - noop deadline [cfq] 33 - # echo deadline > /sys/block/hda/queue/scheduler 34 - # cat /sys/block/hda/queue/scheduler 35 - noop [deadline] cfq 33 + # cat /sys/block/sda/queue/scheduler 34 + [mq-deadline] kyber bfq none 35 + # echo none >/sys/block/sda/queue/scheduler 36 + # cat /sys/block/sda/queue/scheduler 37 + [none] mq-deadline kyber bfq
+7 -89
Documentation/cgroup-v1/blkio-controller.txt
··· 8 8 Plan is to use the same cgroup based management interface for blkio controller 9 9 and based on user options switch IO policies in the background. 10 10 11 - Currently two IO control policies are implemented. First one is proportional 12 - weight time based division of disk policy. It is implemented in CFQ. Hence 13 - this policy takes effect only on leaf nodes when CFQ is being used. The second 14 - one is throttling policy which can be used to specify upper IO rate limits 15 - on devices. This policy is implemented in generic block layer and can be 16 - used on leaf nodes as well as higher level logical devices like device mapper. 11 + One IO control policy is throttling policy which can be used to 12 + specify upper IO rate limits on devices. This policy is implemented in 13 + generic block layer and can be used on leaf nodes as well as higher 14 + level logical devices like device mapper. 17 15 18 16 HOWTO 19 17 ===== 20 - Proportional Weight division of bandwidth 21 - ----------------------------------------- 22 - You can do a very simple testing of running two dd threads in two different 23 - cgroups. Here is what you can do. 24 - 25 - - Enable Block IO controller 26 - CONFIG_BLK_CGROUP=y 27 - 28 - - Enable group scheduling in CFQ 29 - CONFIG_CFQ_GROUP_IOSCHED=y 30 - 31 - - Compile and boot into kernel and mount IO controller (blkio); see 32 - cgroups.txt, Why are cgroups needed?. 33 - 34 - mount -t tmpfs cgroup_root /sys/fs/cgroup 35 - mkdir /sys/fs/cgroup/blkio 36 - mount -t cgroup -o blkio none /sys/fs/cgroup/blkio 37 - 38 - - Create two cgroups 39 - mkdir -p /sys/fs/cgroup/blkio/test1/ /sys/fs/cgroup/blkio/test2 40 - 41 - - Set weights of group test1 and test2 42 - echo 1000 > /sys/fs/cgroup/blkio/test1/blkio.weight 43 - echo 500 > /sys/fs/cgroup/blkio/test2/blkio.weight 44 - 45 - - Create two same size files (say 512MB each) on same disk (file1, file2) and 46 - launch two dd threads in different cgroup to read those files. 47 - 48 - sync 49 - echo 3 > /proc/sys/vm/drop_caches 50 - 51 - dd if=/mnt/sdb/zerofile1 of=/dev/null & 52 - echo $! > /sys/fs/cgroup/blkio/test1/tasks 53 - cat /sys/fs/cgroup/blkio/test1/tasks 54 - 55 - dd if=/mnt/sdb/zerofile2 of=/dev/null & 56 - echo $! > /sys/fs/cgroup/blkio/test2/tasks 57 - cat /sys/fs/cgroup/blkio/test2/tasks 58 - 59 - - At macro level, first dd should finish first. To get more precise data, keep 60 - on looking at (with the help of script), at blkio.disk_time and 61 - blkio.disk_sectors files of both test1 and test2 groups. This will tell how 62 - much disk time (in milliseconds), each group got and how many sectors each 63 - group dispatched to the disk. We provide fairness in terms of disk time, so 64 - ideally io.disk_time of cgroups should be in proportion to the weight. 65 - 66 18 Throttling/Upper Limit policy 67 19 ----------------------------- 68 20 - Enable Block IO controller ··· 46 94 Hierarchical Cgroups 47 95 ==================== 48 96 49 - Both CFQ and throttling implement hierarchy support; however, 97 + Throttling implements hierarchy support; however, 50 98 throttling's hierarchy support is enabled iff "sane_behavior" is 51 99 enabled from cgroup side, which currently is a development option and 52 100 not publicly available. ··· 59 107 | 60 108 test3 61 109 62 - CFQ by default and throttling with "sane_behavior" will handle the 63 - hierarchy correctly. For details on CFQ hierarchy support, refer to 64 - Documentation/block/cfq-iosched.txt. For throttling, all limits apply 110 + Throttling with "sane_behavior" will handle the 111 + hierarchy correctly. For throttling, all limits apply 65 112 to the whole subtree while all statistics are local to the IOs 66 113 directly generated by tasks in that cgroup. 67 114 ··· 80 129 CONFIG_DEBUG_BLK_CGROUP 81 130 - Debug help. Right now some additional stats file show up in cgroup 82 131 if this option is enabled. 83 - 84 - CONFIG_CFQ_GROUP_IOSCHED 85 - - Enables group scheduling in CFQ. Currently only 1 level of group 86 - creation is allowed. 87 132 88 133 CONFIG_BLK_DEV_THROTTLING 89 134 - Enable block device throttling support in block layer. ··· 291 344 - blkio.reset_stats 292 345 - Writing an int to this file will result in resetting all the stats 293 346 for that cgroup. 294 - 295 - CFQ sysfs tunable 296 - ================= 297 - /sys/block/<disk>/queue/iosched/slice_idle 298 - ------------------------------------------ 299 - On a faster hardware CFQ can be slow, especially with sequential workload. 300 - This happens because CFQ idles on a single queue and single queue might not 301 - drive deeper request queue depths to keep the storage busy. In such scenarios 302 - one can try setting slice_idle=0 and that would switch CFQ to IOPS 303 - (IO operations per second) mode on NCQ supporting hardware. 304 - 305 - That means CFQ will not idle between cfq queues of a cfq group and hence be 306 - able to driver higher queue depth and achieve better throughput. That also 307 - means that cfq provides fairness among groups in terms of IOPS and not in 308 - terms of disk time. 309 - 310 - /sys/block/<disk>/queue/iosched/group_idle 311 - ------------------------------------------ 312 - If one disables idling on individual cfq queues and cfq service trees by 313 - setting slice_idle=0, group_idle kicks in. That means CFQ will still idle 314 - on the group in an attempt to provide fairness among groups. 315 - 316 - By default group_idle is same as slice_idle and does not do anything if 317 - slice_idle is enabled. 318 - 319 - One can experience an overall throughput drop if you have created multiple 320 - groups and put applications in that group which are not driving enough 321 - IO to keep disk busy. In that case set group_idle=0, and CFQ will not idle 322 - on individual groups and throughput should improve.
+1
block/Kconfig
··· 73 73 74 74 config BLK_DEV_ZONED 75 75 bool "Zoned block device support" 76 + select MQ_IOSCHED_DEADLINE 76 77 ---help--- 77 78 Block layer zoned block device support. This option enables 78 79 support for ZAC/ZBC host-managed and host-aware zoned block devices.
+34 -111
block/blk-mq-debugfs.c
··· 821 821 {}, 822 822 }; 823 823 824 - static bool debugfs_create_files(struct dentry *parent, void *data, 824 + static void debugfs_create_files(struct dentry *parent, void *data, 825 825 const struct blk_mq_debugfs_attr *attr) 826 826 { 827 827 if (IS_ERR_OR_NULL(parent)) 828 - return false; 828 + return; 829 829 830 830 d_inode(parent)->i_private = data; 831 831 832 - for (; attr->name; attr++) { 833 - if (!debugfs_create_file(attr->name, attr->mode, parent, 834 - (void *)attr, &blk_mq_debugfs_fops)) 835 - return false; 836 - } 837 - return true; 832 + for (; attr->name; attr++) 833 + debugfs_create_file(attr->name, attr->mode, parent, 834 + (void *)attr, &blk_mq_debugfs_fops); 838 835 } 839 836 840 - int blk_mq_debugfs_register(struct request_queue *q) 837 + void blk_mq_debugfs_register(struct request_queue *q) 841 838 { 842 839 struct blk_mq_hw_ctx *hctx; 843 840 int i; 844 841 845 - if (!blk_debugfs_root) 846 - return -ENOENT; 847 - 848 842 q->debugfs_dir = debugfs_create_dir(kobject_name(q->kobj.parent), 849 843 blk_debugfs_root); 850 - if (!q->debugfs_dir) 851 - return -ENOMEM; 852 844 853 - if (!debugfs_create_files(q->debugfs_dir, q, 854 - blk_mq_debugfs_queue_attrs)) 855 - goto err; 845 + debugfs_create_files(q->debugfs_dir, q, blk_mq_debugfs_queue_attrs); 856 846 857 847 /* 858 848 * blk_mq_init_sched() attempted to do this already, but q->debugfs_dir ··· 854 864 855 865 /* Similarly, blk_mq_init_hctx() couldn't do this previously. */ 856 866 queue_for_each_hw_ctx(q, hctx, i) { 857 - if (!hctx->debugfs_dir && blk_mq_debugfs_register_hctx(q, hctx)) 858 - goto err; 859 - if (q->elevator && !hctx->sched_debugfs_dir && 860 - blk_mq_debugfs_register_sched_hctx(q, hctx)) 861 - goto err; 867 + if (!hctx->debugfs_dir) 868 + blk_mq_debugfs_register_hctx(q, hctx); 869 + if (q->elevator && !hctx->sched_debugfs_dir) 870 + blk_mq_debugfs_register_sched_hctx(q, hctx); 862 871 } 863 872 864 873 if (q->rq_qos) { ··· 868 879 rqos = rqos->next; 869 880 } 870 881 } 871 - 872 - return 0; 873 - 874 - err: 875 - blk_mq_debugfs_unregister(q); 876 - return -ENOMEM; 877 882 } 878 883 879 884 void blk_mq_debugfs_unregister(struct request_queue *q) ··· 877 894 q->debugfs_dir = NULL; 878 895 } 879 896 880 - static int blk_mq_debugfs_register_ctx(struct blk_mq_hw_ctx *hctx, 881 - struct blk_mq_ctx *ctx) 897 + static void blk_mq_debugfs_register_ctx(struct blk_mq_hw_ctx *hctx, 898 + struct blk_mq_ctx *ctx) 882 899 { 883 900 struct dentry *ctx_dir; 884 901 char name[20]; 885 902 886 903 snprintf(name, sizeof(name), "cpu%u", ctx->cpu); 887 904 ctx_dir = debugfs_create_dir(name, hctx->debugfs_dir); 888 - if (!ctx_dir) 889 - return -ENOMEM; 890 905 891 - if (!debugfs_create_files(ctx_dir, ctx, blk_mq_debugfs_ctx_attrs)) 892 - return -ENOMEM; 893 - 894 - return 0; 906 + debugfs_create_files(ctx_dir, ctx, blk_mq_debugfs_ctx_attrs); 895 907 } 896 908 897 - int blk_mq_debugfs_register_hctx(struct request_queue *q, 898 - struct blk_mq_hw_ctx *hctx) 909 + void blk_mq_debugfs_register_hctx(struct request_queue *q, 910 + struct blk_mq_hw_ctx *hctx) 899 911 { 900 912 struct blk_mq_ctx *ctx; 901 913 char name[20]; 902 914 int i; 903 915 904 - if (!q->debugfs_dir) 905 - return -ENOENT; 906 - 907 916 snprintf(name, sizeof(name), "hctx%u", hctx->queue_num); 908 917 hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir); 909 - if (!hctx->debugfs_dir) 910 - return -ENOMEM; 911 918 912 - if (!debugfs_create_files(hctx->debugfs_dir, hctx, 913 - blk_mq_debugfs_hctx_attrs)) 914 - goto err; 919 + debugfs_create_files(hctx->debugfs_dir, hctx, blk_mq_debugfs_hctx_attrs); 915 920 916 - hctx_for_each_ctx(hctx, ctx, i) { 917 - if (blk_mq_debugfs_register_ctx(hctx, ctx)) 918 - goto err; 919 - } 920 - 921 - return 0; 922 - 923 - err: 924 - blk_mq_debugfs_unregister_hctx(hctx); 925 - return -ENOMEM; 921 + hctx_for_each_ctx(hctx, ctx, i) 922 + blk_mq_debugfs_register_ctx(hctx, ctx); 926 923 } 927 924 928 925 void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx) ··· 912 949 hctx->debugfs_dir = NULL; 913 950 } 914 951 915 - int blk_mq_debugfs_register_hctxs(struct request_queue *q) 952 + void blk_mq_debugfs_register_hctxs(struct request_queue *q) 916 953 { 917 954 struct blk_mq_hw_ctx *hctx; 918 955 int i; 919 956 920 - queue_for_each_hw_ctx(q, hctx, i) { 921 - if (blk_mq_debugfs_register_hctx(q, hctx)) 922 - return -ENOMEM; 923 - } 924 - 925 - return 0; 957 + queue_for_each_hw_ctx(q, hctx, i) 958 + blk_mq_debugfs_register_hctx(q, hctx); 926 959 } 927 960 928 961 void blk_mq_debugfs_unregister_hctxs(struct request_queue *q) ··· 930 971 blk_mq_debugfs_unregister_hctx(hctx); 931 972 } 932 973 933 - int blk_mq_debugfs_register_sched(struct request_queue *q) 974 + void blk_mq_debugfs_register_sched(struct request_queue *q) 934 975 { 935 976 struct elevator_type *e = q->elevator->type; 936 977 937 - if (!q->debugfs_dir) 938 - return -ENOENT; 939 - 940 978 if (!e->queue_debugfs_attrs) 941 - return 0; 979 + return; 942 980 943 981 q->sched_debugfs_dir = debugfs_create_dir("sched", q->debugfs_dir); 944 - if (!q->sched_debugfs_dir) 945 - return -ENOMEM; 946 982 947 - if (!debugfs_create_files(q->sched_debugfs_dir, q, 948 - e->queue_debugfs_attrs)) 949 - goto err; 950 - 951 - return 0; 952 - 953 - err: 954 - blk_mq_debugfs_unregister_sched(q); 955 - return -ENOMEM; 983 + debugfs_create_files(q->sched_debugfs_dir, q, e->queue_debugfs_attrs); 956 984 } 957 985 958 986 void blk_mq_debugfs_unregister_sched(struct request_queue *q) ··· 954 1008 rqos->debugfs_dir = NULL; 955 1009 } 956 1010 957 - int blk_mq_debugfs_register_rqos(struct rq_qos *rqos) 1011 + void blk_mq_debugfs_register_rqos(struct rq_qos *rqos) 958 1012 { 959 1013 struct request_queue *q = rqos->q; 960 1014 const char *dir_name = rq_qos_id_to_name(rqos->id); 961 1015 962 - if (!q->debugfs_dir) 963 - return -ENOENT; 964 - 965 1016 if (rqos->debugfs_dir || !rqos->ops->debugfs_attrs) 966 - return 0; 1017 + return; 967 1018 968 - if (!q->rqos_debugfs_dir) { 1019 + if (!q->rqos_debugfs_dir) 969 1020 q->rqos_debugfs_dir = debugfs_create_dir("rqos", 970 1021 q->debugfs_dir); 971 - if (!q->rqos_debugfs_dir) 972 - return -ENOMEM; 973 - } 974 1022 975 1023 rqos->debugfs_dir = debugfs_create_dir(dir_name, 976 1024 rqos->q->rqos_debugfs_dir); 977 - if (!rqos->debugfs_dir) 978 - return -ENOMEM; 979 1025 980 - if (!debugfs_create_files(rqos->debugfs_dir, rqos, 981 - rqos->ops->debugfs_attrs)) 982 - goto err; 983 - return 0; 984 - err: 985 - blk_mq_debugfs_unregister_rqos(rqos); 986 - return -ENOMEM; 1026 + debugfs_create_files(rqos->debugfs_dir, rqos, rqos->ops->debugfs_attrs); 987 1027 } 988 1028 989 1029 void blk_mq_debugfs_unregister_queue_rqos(struct request_queue *q) ··· 978 1046 q->rqos_debugfs_dir = NULL; 979 1047 } 980 1048 981 - int blk_mq_debugfs_register_sched_hctx(struct request_queue *q, 982 - struct blk_mq_hw_ctx *hctx) 1049 + void blk_mq_debugfs_register_sched_hctx(struct request_queue *q, 1050 + struct blk_mq_hw_ctx *hctx) 983 1051 { 984 1052 struct elevator_type *e = q->elevator->type; 985 1053 986 - if (!hctx->debugfs_dir) 987 - return -ENOENT; 988 - 989 1054 if (!e->hctx_debugfs_attrs) 990 - return 0; 1055 + return; 991 1056 992 1057 hctx->sched_debugfs_dir = debugfs_create_dir("sched", 993 1058 hctx->debugfs_dir); 994 - if (!hctx->sched_debugfs_dir) 995 - return -ENOMEM; 996 - 997 - if (!debugfs_create_files(hctx->sched_debugfs_dir, hctx, 998 - e->hctx_debugfs_attrs)) 999 - return -ENOMEM; 1000 - 1001 - return 0; 1059 + debugfs_create_files(hctx->sched_debugfs_dir, hctx, 1060 + e->hctx_debugfs_attrs); 1002 1061 } 1003 1062 1004 1063 void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx)
+15 -21
block/blk-mq-debugfs.h
··· 18 18 int __blk_mq_debugfs_rq_show(struct seq_file *m, struct request *rq); 19 19 int blk_mq_debugfs_rq_show(struct seq_file *m, void *v); 20 20 21 - int blk_mq_debugfs_register(struct request_queue *q); 21 + void blk_mq_debugfs_register(struct request_queue *q); 22 22 void blk_mq_debugfs_unregister(struct request_queue *q); 23 - int blk_mq_debugfs_register_hctx(struct request_queue *q, 24 - struct blk_mq_hw_ctx *hctx); 23 + void blk_mq_debugfs_register_hctx(struct request_queue *q, 24 + struct blk_mq_hw_ctx *hctx); 25 25 void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx); 26 - int blk_mq_debugfs_register_hctxs(struct request_queue *q); 26 + void blk_mq_debugfs_register_hctxs(struct request_queue *q); 27 27 void blk_mq_debugfs_unregister_hctxs(struct request_queue *q); 28 28 29 - int blk_mq_debugfs_register_sched(struct request_queue *q); 29 + void blk_mq_debugfs_register_sched(struct request_queue *q); 30 30 void blk_mq_debugfs_unregister_sched(struct request_queue *q); 31 - int blk_mq_debugfs_register_sched_hctx(struct request_queue *q, 31 + void blk_mq_debugfs_register_sched_hctx(struct request_queue *q, 32 32 struct blk_mq_hw_ctx *hctx); 33 33 void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx); 34 34 35 - int blk_mq_debugfs_register_rqos(struct rq_qos *rqos); 35 + void blk_mq_debugfs_register_rqos(struct rq_qos *rqos); 36 36 void blk_mq_debugfs_unregister_rqos(struct rq_qos *rqos); 37 37 void blk_mq_debugfs_unregister_queue_rqos(struct request_queue *q); 38 38 #else 39 - static inline int blk_mq_debugfs_register(struct request_queue *q) 39 + static inline void blk_mq_debugfs_register(struct request_queue *q) 40 40 { 41 - return 0; 42 41 } 43 42 44 43 static inline void blk_mq_debugfs_unregister(struct request_queue *q) 45 44 { 46 45 } 47 46 48 - static inline int blk_mq_debugfs_register_hctx(struct request_queue *q, 49 - struct blk_mq_hw_ctx *hctx) 47 + static inline void blk_mq_debugfs_register_hctx(struct request_queue *q, 48 + struct blk_mq_hw_ctx *hctx) 50 49 { 51 - return 0; 52 50 } 53 51 54 52 static inline void blk_mq_debugfs_unregister_hctx(struct blk_mq_hw_ctx *hctx) 55 53 { 56 54 } 57 55 58 - static inline int blk_mq_debugfs_register_hctxs(struct request_queue *q) 56 + static inline void blk_mq_debugfs_register_hctxs(struct request_queue *q) 59 57 { 60 - return 0; 61 58 } 62 59 63 60 static inline void blk_mq_debugfs_unregister_hctxs(struct request_queue *q) 64 61 { 65 62 } 66 63 67 - static inline int blk_mq_debugfs_register_sched(struct request_queue *q) 64 + static inline void blk_mq_debugfs_register_sched(struct request_queue *q) 68 65 { 69 - return 0; 70 66 } 71 67 72 68 static inline void blk_mq_debugfs_unregister_sched(struct request_queue *q) 73 69 { 74 70 } 75 71 76 - static inline int blk_mq_debugfs_register_sched_hctx(struct request_queue *q, 77 - struct blk_mq_hw_ctx *hctx) 72 + static inline void blk_mq_debugfs_register_sched_hctx(struct request_queue *q, 73 + struct blk_mq_hw_ctx *hctx) 78 74 { 79 - return 0; 80 75 } 81 76 82 77 static inline void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx) 83 78 { 84 79 } 85 80 86 - static inline int blk_mq_debugfs_register_rqos(struct rq_qos *rqos) 81 + static inline void blk_mq_debugfs_register_rqos(struct rq_qos *rqos) 87 82 { 88 - return 0; 89 83 } 90 84 91 85 static inline void blk_mq_debugfs_unregister_rqos(struct rq_qos *rqos)
-1
block/blk-mq-sched.c
··· 555 555 int i; 556 556 557 557 lockdep_assert_held(&q->sysfs_lock); 558 - WARN_ON(!q->elevator); 559 558 560 559 queue_for_each_hw_ctx(q, hctx, i) { 561 560 if (hctx->sched_tags)
+6 -3
drivers/ata/libata-core.c
··· 4460 4460 { "ST3320[68]13AS", "SD1[5-9]", ATA_HORKAGE_NONCQ | 4461 4461 ATA_HORKAGE_FIRMWARE_WARN }, 4462 4462 4463 - /* drives which fail FPDMA_AA activation (some may freeze afterwards) */ 4464 - { "ST1000LM024 HN-M101MBB", "2AR10001", ATA_HORKAGE_BROKEN_FPDMA_AA }, 4465 - { "ST1000LM024 HN-M101MBB", "2BA30001", ATA_HORKAGE_BROKEN_FPDMA_AA }, 4463 + /* drives which fail FPDMA_AA activation (some may freeze afterwards) 4464 + the ST disks also have LPM issues */ 4465 + { "ST1000LM024 HN-M101MBB", "2AR10001", ATA_HORKAGE_BROKEN_FPDMA_AA | 4466 + ATA_HORKAGE_NOLPM, }, 4467 + { "ST1000LM024 HN-M101MBB", "2BA30001", ATA_HORKAGE_BROKEN_FPDMA_AA | 4468 + ATA_HORKAGE_NOLPM, }, 4466 4469 { "VB0250EAVER", "HPG7", ATA_HORKAGE_BROKEN_FPDMA_AA }, 4467 4470 4468 4471 /* Blacklist entries taken from Silicon Image 3124/3132
-4
drivers/block/null_blk_zoned.c
··· 74 74 struct nullb_device *dev = nullb->dev; 75 75 unsigned int zno, nrz = 0; 76 76 77 - if (!dev->zoned) 78 - /* Not a zoned null device */ 79 - return -EOPNOTSUPP; 80 - 81 77 zno = null_zone_no(dev, sector); 82 78 if (zno < dev->nr_zones) { 83 79 nrz = min_t(unsigned int, *nr_zones, dev->nr_zones - zno);
+1 -1
drivers/block/ps3vram.c
··· 767 767 strlcpy(gendisk->disk_name, DEVICE_NAME, sizeof(gendisk->disk_name)); 768 768 set_capacity(gendisk, priv->size >> 9); 769 769 770 - dev_info(&dev->core, "%s: Using %lu MiB of GPU memory\n", 770 + dev_info(&dev->core, "%s: Using %llu MiB of GPU memory\n", 771 771 gendisk->disk_name, get_capacity(gendisk) >> 11); 772 772 773 773 device_add_disk(&dev->core, gendisk, NULL);
+13 -3
drivers/md/bcache/bset.c
··· 887 887 struct bset *i = bset_tree_last(b)->data; 888 888 struct bkey *m, *prev = NULL; 889 889 struct btree_iter iter; 890 + struct bkey preceding_key_on_stack = ZERO_KEY; 891 + struct bkey *preceding_key_p = &preceding_key_on_stack; 890 892 891 893 BUG_ON(b->ops->is_extents && !KEY_SIZE(k)); 892 894 893 - m = bch_btree_iter_init(b, &iter, b->ops->is_extents 894 - ? PRECEDING_KEY(&START_KEY(k)) 895 - : PRECEDING_KEY(k)); 895 + /* 896 + * If k has preceding key, preceding_key_p will be set to address 897 + * of k's preceding key; otherwise preceding_key_p will be set 898 + * to NULL inside preceding_key(). 899 + */ 900 + if (b->ops->is_extents) 901 + preceding_key(&START_KEY(k), &preceding_key_p); 902 + else 903 + preceding_key(k, &preceding_key_p); 904 + 905 + m = bch_btree_iter_init(b, &iter, preceding_key_p); 896 906 897 907 if (b->ops->insert_fixup(b, k, &iter, replace_key)) 898 908 return status;
+20 -14
drivers/md/bcache/bset.h
··· 434 434 return __bch_cut_back(where, k); 435 435 } 436 436 437 - #define PRECEDING_KEY(_k) \ 438 - ({ \ 439 - struct bkey *_ret = NULL; \ 440 - \ 441 - if (KEY_INODE(_k) || KEY_OFFSET(_k)) { \ 442 - _ret = &KEY(KEY_INODE(_k), KEY_OFFSET(_k), 0); \ 443 - \ 444 - if (!_ret->low) \ 445 - _ret->high--; \ 446 - _ret->low--; \ 447 - } \ 448 - \ 449 - _ret; \ 450 - }) 437 + /* 438 + * Pointer '*preceding_key_p' points to a memory object to store preceding 439 + * key of k. If the preceding key does not exist, set '*preceding_key_p' to 440 + * NULL. So the caller of preceding_key() needs to take care of memory 441 + * which '*preceding_key_p' pointed to before calling preceding_key(). 442 + * Currently the only caller of preceding_key() is bch_btree_insert_key(), 443 + * and it points to an on-stack variable, so the memory release is handled 444 + * by stackframe itself. 445 + */ 446 + static inline void preceding_key(struct bkey *k, struct bkey **preceding_key_p) 447 + { 448 + if (KEY_INODE(k) || KEY_OFFSET(k)) { 449 + (**preceding_key_p) = KEY(KEY_INODE(k), KEY_OFFSET(k), 0); 450 + if (!(*preceding_key_p)->low) 451 + (*preceding_key_p)->high--; 452 + (*preceding_key_p)->low--; 453 + } else { 454 + (*preceding_key_p) = NULL; 455 + } 456 + } 451 457 452 458 static inline bool bch_ptr_invalid(struct btree_keys *b, const struct bkey *k) 453 459 {
+6 -1
drivers/md/bcache/sysfs.c
··· 431 431 bch_writeback_queue(dc); 432 432 } 433 433 434 + /* 435 + * Only set BCACHE_DEV_WB_RUNNING when cached device attached to 436 + * a cache set, otherwise it doesn't make sense. 437 + */ 434 438 if (attr == &sysfs_writeback_percent) 435 - if (!test_and_set_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags)) 439 + if ((dc->disk.c != NULL) && 440 + (!test_and_set_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags))) 436 441 schedule_delayed_work(&dc->writeback_rate_update, 437 442 dc->writeback_rate_update_seconds * HZ); 438 443
+3 -1
fs/io_uring.c
··· 2777 2777 io_eventfd_unregister(ctx); 2778 2778 2779 2779 #if defined(CONFIG_UNIX) 2780 - if (ctx->ring_sock) 2780 + if (ctx->ring_sock) { 2781 + ctx->ring_sock->file = NULL; /* so that iput() is called */ 2781 2782 sock_release(ctx->ring_sock); 2783 + } 2782 2784 #endif 2783 2785 2784 2786 io_mem_free(ctx->sq_ring);