tree: https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git current-work head: 1ac686f6d1b04b480cd245fb927180e1238bd3ac commit: 1ac686f6d1b04b480cd245fb927180e1238bd3ac [3/3] current-work config: x86_64-randconfig-x008-201804 (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: git checkout 1ac686f6d1b04b480cd245fb927180e1238bd3ac # save the attached .config to linux build tree make ARCH=x86_64
All error/warnings (new ones prefixed by >>): from include/linux/gfp.h:6, from include/linux/slab.h:15, from block/blk-wbt.c:23: block/blk-wbt.c:463:23: error: 'struct rq_wb' has no member named 'last_comp' time_before(now, rwb->last_comp + HZ / 10); ^ include/linux/jiffies.h:105:18: note: in definition of macro 'time_after' ((long)((b) - (a)) < 0)) ^ block/blk-wbt.c:463:3: note: in expansion of macro 'time_before' time_before(now, rwb->last_comp + HZ / 10); ^~~~~~~~~~~ block/blk-wbt.c: In function 'get_limit': block/blk-wbt.c:481:16: error: 'struct rq_wb' has no member named 'wb_max'; did you mean 'wb_normal'? limit = rwb->wb_max; ^~~~~~ wb_normal block/blk-wbt.c: In function 'wbt_wait': block/blk-wbt.c:587:28: error: 'struct rq_wb' has no member named 'last_issue'; did you mean 'sync_issue'? wb_timestamp(rwb, &rwb->last_issue); ^~~~~~~~~~ sync_issue block/blk-wbt.c:593:29: error: 'struct rq_wb' has no member named 'cb' if (!blk_stat_is_active(rwb->cb)) ^~ block/blk-wbt.c: In function 'wbt_set_queue_depth': block/blk-wbt.c:634:8: error: 'struct rq_wb' has no member named 'queue_depth'; did you mean 'rq_depth'? rwb->queue_depth = depth; ^~~~~~~~~~~ rq_depth block/blk-wbt.c: In function 'wbt_set_write_cache': block/blk-wbt.c:642:6: error: 'struct rq_wb' has no member named 'wc' rwb->wc = write_cache_on; ^~ block/blk-wbt.c: In function 'wbt_init': block/blk-wbt.c:704:5: error: 'struct rq_wb' has no member named 'cb' rwb->cb = blk_stat_alloc_callback(wb_timer_fn, wbt_data_dir, 2, rwb); ^~ block/blk-wbt.c:705:10: error: 'struct rq_wb' has no member named 'cb' if (!rwb->cb) { ^~ block/blk-wbt.c:713:5: error: 'struct rq_wb' has no member named 'last_comp' rwb->last_comp = rwb->last_issue = jiffies; ^~ block/blk-wbt.c:713:24: error: 'struct rq_wb' has no member named 'last_issue'; did you mean 'sync_issue'? rwb->last_comp = rwb->last_issue = jiffies; ^~~~~~~~~~ sync_issue block/blk-wbt.c:715:5: error: 'struct rq_wb' has no member named 'win_nsec' rwb->win_nsec = RWB_WINDOW_NSEC; ^~ block/blk-wbt.c:723:30: error: 'struct rq_wb' has no member named 'cb' blk_stat_add_callback(q, rwb->cb); ^~ block/blk-wbt.c:725:5: error: 'struct rq_wb' has no member named 'min_lat_nsec' rwb->min_lat_nsec = wbt_default_latency_nsec(q); ^~ block/blk-wbt.c: In function 'blk_qos_exit': block/blk-wbt.c:743:12: error: 'struct request_queue' has no member named 'rwb'; did you mean 'rq_wb'? while (q->rwb) { ^~~ rq_wb block/blk-wbt.c:744:26: error: 'struct request_queue' has no member named 'rq_rwb'; did you mean 'rq_wb'? struct rq_wb *rwb = q->rq_rwb; ^~~~~~ rq_wb block/blk-wbt.c:745:17: error: 'struct rq_wb' has no member named 'next' q->rq_wb = rwb->next; ^~ block/blk-wbt.c:746:34: error: 'struct rq_wb' has no member named 'cb' blk_stat_remove_callback(q, rwb->cb); ^~ block/blk-wbt.c:747:29: error: 'struct rq_wb' has no member named 'cb' blk_stat_free_callback(rwb->cb); ^~ block/blk-wbt.c: In function 'blkg_to_qg': block/blk-wbt.c:783:9: error: implicit declaration of function 'pd_to_tg'; did you mean 'pd_to_qg'? [-Werror=implicit-function-declaration] return pd_to_tg(blkg_to_pd(blkg, &blkcg_policy_qos)); ^~~~~~~~ pd_to_qg block/blk-wbt.c:783:9: warning: return makes pointer from integer without a cast [-Wint-conversion] return pd_to_tg(blkg_to_pd(blkg, &blkcg_policy_qos)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block/blk-wbt.c: In function 'check_scale_change': block/blk-wbt.c:853:14: error: passing argument 1 of 'scale_down' from incompatible pointer type [-Werror=incompatible-pointer-types] scale_down(&qg->rq_wait, false); ^ block/blk-wbt.c:334:13: note: expected 'struct rq_depth *' but argument is of type 'struct rq_wait *' static void scale_down(struct rq_depth *rqd, bool hard_throttle) ^~~~~~~~~~ block/blk-wbt.c:855:12: error: passing argument 1 of 'scale_up' from incompatible pointer type [-Werror=incompatible-pointer-types] scale_up(&qg->rq_wait); ^ block/blk-wbt.c:312:13: note: expected 'struct rq_depth *' but argument is of type 'struct rq_wait *' static void scale_up(struct rq_depth *rqd) ^~~~~~~~ block/blk-wbt.c:835:15: warning: unused variable 'scale_lat' [-Wunused-variable] unsigned int scale_lat = READ_ONCE(blkcg_qos->scale_lat); ^~~~~~~~~ block/blk-wbt.c: In function 'blkcg_qos_throttle': >> block/blk-wbt.c:866:32: error: 'struct rq_qos' has no member named 'q' struct request_queue *q = rqos->q; ^~ >> block/blk-wbt.c:871:32: error: 'struct blkcg_gq' has no member named 'css' bio_associate_blkcg(bio, &blkg->css); ^~ block/blk-wbt.c:865:18: warning: unused variable 'rqw' [-Wunused-variable] struct rq_wait *rqw; ^~~ block/blk-wbt.c: At top level: block/blk-wbt.c:907:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .throttle = blkcg_qos_throttle, ^~~~~~~~~~~~~~~~~~ block/blk-wbt.c:907:14: note: (near initialization for 'blkcg_qos_ops.throttle') block/blk-wbt.c:908:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .complete = blkcg_qos_complete, ^~~~~~~~~~~~~~~~~~ block/blk-wbt.c:908:14: note: (near initialization for 'blkcg_qos_ops.complete') block/blk-wbt.c: In function 'blkcg_qos_init': block/blk-wbt.c:920:7: error: 'rwb' undeclared (first use in this function); did you mean 'rmb'? if (!rwb) ^~~ rmb >> block/blk-wbt.c:924:6: error: 'struct rq_qos' has no member named 'cb' rqos->cb = blk_stat_alloc_callback(qos_timer_fn, wbt_data_dir, 2, ^~ block/blk-wbt.c:924:37: error: 'qos_timer_fn' undeclared (first use in this function); did you mean 'wb_timer_fn'? rqos->cb = blk_stat_alloc_callback(qos_timer_fn, wbt_data_dir, 2, ^~~~~~~~~~~~ wb_timer_fn block/blk-wbt.c:926:11: error: 'struct rq_qos' has no member named 'cb' if (!rqos->cb) { ^~ block/blk-wbt.c:932:31: error: 'struct rq_qos' has no member named 'cb' blk_stat_add_callback(q, rqos->cb); ^~ block/blk-wbt.c:915:6: warning: unused variable 'i' [-Wunused-variable] int i; ^ block/blk-wbt.c: In function 'qos_set_limit': block/blk-wbt.c:974:2: error: 'ret' undeclared (first use in this function); did you mean 'net'? ret = blkg_conf_prep(blkcg, &blkcg_policy_qos, buf, &ctx); ^~~ net block/blk-wbt.c:991:2: error: 'tg' undeclared (first use in this function); did you mean 'qg'? tg->set_min_lat_nsec = val; ^~ qg >> block/blk-wbt.c:995:2: error: expected ';' before 'while' while (blkg->parent) { ^~~~~ >> block/blk-wbt.c:1004:10: error: 'struct qos_grp' has no member named 'rq' this_qg->rq.depth.min_lat_nsec = max(val, this_qg->rq_depth.min_lat_nsec); ^~ In file included from block/blk-wbt.c:21:0: include/linux/kernel.h:808:16: warning: comparison of distinct pointer types lacks a cast (void) (&max1 == &max2); \ ^ include/linux/kernel.h:817:2: note: in expansion of macro '__max' __max(typeof(x), typeof(y), \ ^~~~~ >> block/blk-wbt.c:1004:36: note: in expansion of macro 'max' this_qg->rq.depth.min_lat_nsec = max(val, this_qg->rq_depth.min_lat_nsec); ^~~ In file included from include/linux/bitops.h:38:0, from include/linux/kernel.h:11, from block/blk-wbt.c:21: block/blk-wbt.c: In function 'qos_pd_init': >> block/blk-wbt.c:1050:45: error: 'q' undeclared (first use in this function); >> did you mean 'qg'? qg->rq_depth.wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags); ^ arch/x86/include/asm/bitops.h:351:30: note: in definition of macro 'test_bit' ? constant_test_bit((nr), (addr)) \ ^~~~ block/blk-wbt.c: In function 'qos_pd_offline': >> block/blk-wbt.c:1068:2: error: 'ag' undeclared (first use in this function); >> did you mean 'qg'? ag->set_min_lat_nsec = 0; ^~ qg >> block/blk-wbt.c:1079:10: error: 'this_qg' is a pointer; did you mean to use >> '->'? this_qg.rq_depth ^ -> block/blk-wbt.c:1080:2: error: expected ';' before '}' token } ^ block/blk-wbt.c: At top level: block/blk-wbt.c:1093:15: error: 'qos_print_limit' undeclared here (not in a function); did you mean 'qg_print_limit'? .seq_show = qos_print_limit, ^~~~~~~~~~~~~~~ qg_print_limit block/blk-wbt.c:1101:17: error: 'pos_pd_alloc' undeclared here (not in a function); did you mean 'qos_pd_alloc'? .pd_alloc_fn = pos_pd_alloc, ^~~~~~~~~~~~ qos_pd_alloc block/blk-wbt.c:1101:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] block/blk-wbt.c:1101:17: note: (near initialization for 'blkcg_policy_qos.pd_alloc_fn') block/blk-wbt.c:1101:17: error: initializer element is not constant block/blk-wbt.c:1101:17: note: (near initialization for 'blkcg_policy_qos.pd_alloc_fn') block/blk-wbt.c: In function 'close_io': block/blk-wbt.c:464:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ block/blk-wbt.c: In function 'blk_qos_exit': block/blk-wbt.c:750:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ At top level: block/blk-wbt.c:1032:33: warning: 'qos_pd_alloc' defined but not used [-Wunused-function] static struct blkg_policy_data *qos_pd_alloc(gfp_t gfp, int node) ^~~~~~~~~~~~ block/blk-wbt.c:1025:12: warning: 'qg_print_limit' defined but not used [-Wunused-function] static int qg_print_limit(struct seq_file *sf, void *v) ^~~~~~~~~~~~~~ block/blk-wbt.c:906:26: warning: 'blkcg_qos_ops' defined but not used [-Wunused-variable] static struct rq_qos_ops blkcg_qos_ops = { ^~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +866 block/blk-wbt.c 830 831 static void check_scale_change(struct blkcg_qos *blkcg_qos, struct qos_grp *qg) 832 { 833 unsigned int cur_cookie = atomic_read(&blkcg_qos->scale_cookie); 834 unsigned int our_cookie = atomic_read(&qg->scale_cookie); > 835 unsigned int scale_lat = READ_ONCE(blkcg_qos->scale_lat); 836 unsigned int old; 837 int direction = 0; 838 839 if (cur_cookie < our_cookie) 840 direction = -1; 841 else if (cur_cookie > our_cookie) 842 direction = 1; 843 else 844 return; 845 846 old = atomic_cmpxchg(&qg->scale_cookie, our_cookie, cur_cookie); 847 848 /* Somebody beat us to the punch, just bail. */ 849 if (old != our_cookie) 850 return; 851 852 if (direction < 0) 853 scale_down(&qg->rq_wait, false); 854 else 855 scale_up(&qg->rq_wait); 856 } 857 858 static enum wbt_flags blkcg_qos_throttle(struct rq_qos *rqos, struct bio *bio, 859 spinlock_t *lock) 860 { 861 struct blkcg_qos *blkcg_qos = BLKCG_QOS(rqos); 862 struct blkcg *blkcg; 863 struct blkcg_gq *blkg; 864 struct qos_grp *qg; 865 struct rq_wait *rqw; > 866 struct request_queue *q = rqos->q; 867 bool throttle = false; 868 869 rcu_read_lock(); 870 blkcg = bio_blkcg(bio); > 871 bio_associate_blkcg(bio, &blkg->css); 872 blkg = blkg_lookup(blkcg, q); 873 if (unlikely(!blkg)) { 874 if (!lock) 875 spin_lock_irq(q->queue_lock); 876 blkg = blkg_lookup_create(blkcg, q); 877 if (IS_ERR(blkg)) 878 blkg = NULL; 879 if (!lock) 880 spin_unlock_irq(q->queue_lock); 881 } 882 if (!blkg) 883 goto out; 884 885 qg = blkg_to_qg(blkg); 886 check_scale_change(blkcg_qos, qg); 887 if (!atomic_inc_below(&qg->rq_wait.inflight, 888 qg->rq_depth.max_depth)) { 889 blkg_get(blkg); 890 throttle = true; 891 } 892 out: 893 rcu_read_unlock(); 894 if (throttle) { 895 __blkcg_qos_throttle(rqos, qg, lock); 896 blkg_put(blkg); 897 } 898 return 0; 899 } 900 901 static void blkcg_qos_complete(struct rq_qos *rqos, 902 struct blk_issue_stat *stat) 903 { 904 } 905 906 static struct rq_qos_ops blkcg_qos_ops = { 907 .throttle = blkcg_qos_throttle, > 908 .complete = blkcg_qos_complete, 909 }; 910 911 static int blkcg_qos_init(struct request_queue *q) 912 { 913 struct blkcg_qos *blkcg_qos; 914 struct rq_qos *rqos; 915 int i; 916 917 BUILD_BUG_ON(WBT_NR_BITS > BLK_STAT_RES_BITS); 918 919 blkcg_qos = kzalloc(sizeof(*blkcg_qos), GFP_KERNEL); 920 if (!rwb) 921 return -ENOMEM; 922 923 rqos = &blkcg_qos->rqos; > 924 rqos->cb = blk_stat_alloc_callback(qos_timer_fn, wbt_data_dir, > 2, 925 blkcg_qos); 926 if (!rqos->cb) { 927 kfree(blkcg_qos); 928 return -ENOMEM; 929 } 930 931 rq_qos_add(q, rqos); 932 blk_stat_add_callback(q, rqos->cb); 933 atomic_set(&blkcg_qos->scale_cookie, DEFAULT_SCALE_COOKIE); 934 blkcg_qos->scale_lat = 0; 935 #if 0 936 for (i = 0; i < WBT_NUM_RWQ; i++) { 937 atomic_set(&rwb->rq_wait[i].inflight, 0); 938 init_waitqueue_head(&rwb->rq_wait[i].wait); 939 } 940 941 rwb->enable_state = WBT_STATE_ON_DEFAULT; 942 wbt_update_limits(rwb); 943 944 /* 945 * Assign rwb and add the stats callback. 946 */ 947 if (q->rq_wb) 948 q->rq_wb->next = rwb; 949 else (q->rq_wb) 950 q->rq_wb = rwb; 951 blk_stat_add_callback(q, rwb->cb); 952 953 rwb->min_lat_nsec = wbt_default_latency_nsec(q); 954 955 wbt_set_queue_depth(rwb, blk_queue_depth(q)); 956 wbt_set_write_cache(rwb, test_bit(QUEUE_FLAG_WC, &q->queue_flags)); 957 #endif 958 return 0; 959 } 960 961 static ssize_t qos_set_limit(struct kernfs_open_file *of, char *buf, 962 size_t nbytes, loff_t off) 963 { 964 struct blkcg *blkcg = css_to_blkcg(of_css(of)); 965 struct blkcg_gq *blkg; 966 struct cgroup_subsys_state *pos_css; 967 struct blkg_conf_ctx ctx; 968 struct qos_grp *qg; 969 char tok[29]; /* latency=18446744073709551616 */ 970 char *p; 971 u64 val; 972 int len; 973 > 974 ret = blkg_conf_prep(blkcg, &blkcg_policy_qos, buf, &ctx); 975 if (ret) 976 return ret; 977 978 qg = blkg_to_qg(ctx.blkg); 979 if (sscanf(ctx.body,"%28s%n", tok, &len) != 1) 980 goto out; 981 if (tok[0] == '\0') 982 goto out; 983 984 ret = -EINVAL; 985 p = tok; 986 strsep(&p, "="); 987 if (!p || sscanf(p, "%llu", &val) != 1) 988 goto out; 989 if (strcmp(tok, "latency")) 990 goto out; > 991 tg->set_min_lat_nsec = val; 992 993 /* Walk up the tree to see if our new val is lower than it should be. */ 994 blkg = ctx.blkg > 995 while (blkg->parent) { 996 struct qos_grp *this_qg = blk_to_cg(blkg->parent); 997 val = max(val, this_qg->set_min_lat_nsec); 998 blkg = blkg->parent; 999 } 1000 tg->rq_depth.min_lat_nsec = val; 1001 1002 blkg_for_each_descendant_pre(blkg, pos_css, ctx.blkg) { 1003 struct qos_grp *this_qg = blkg_to_qg(blkg); > 1004 this_qg->rq.depth.min_lat_nsec = max(val, > this_qg->rq_depth.min_lat_nsec); 1005 } 1006 ret = 0; 1007 out: 1008 blkg_conf_finish(&ctx); 1009 return ret ?: nbytes; 1010 } 1011 1012 static u64 qg_prfill_limit(struct seq_file *sf, struct blkg_policy_data *pd, 1013 int off) 1014 { 1015 struct qos_grp *qg = pd_to_qg(pd); 1016 const char *dname = blkg_dev_name(pd->blkg); 1017 1018 if (!dname) 1019 return 0; 1020 seq_printf(sf, "%s latency=%llu\n", 1021 dname, (unsigned long long)qg->set_min_lat_nsec); 1022 return 0; 1023 } 1024 1025 static int qg_print_limit(struct seq_file *sf, void *v) 1026 { 1027 blkcg_print_blkgs(sf, css_to_blkcg(seq_css(sf)), qg_prfill_limit, 1028 &blkcg_policy_qos, seq_cft(sf)->private, false); 1029 return 0; 1030 } 1031 1032 static struct blkg_policy_data *qos_pd_alloc(gfp_t gfp, int node) 1033 { 1034 struct qos_grp *qg; 1035 1036 qg = kzalloc_node(sizeof(*qg), gfp, node); 1037 if (!qg) 1038 return NULL; 1039 return &qg->pd; 1040 } 1041 1042 static void qos_pd_init(struct blkg_policy_data *pd) 1043 { 1044 struct qos_grp *qg = pd_to_qg(pd); 1045 struct blkcg_gq *blkg = qg_to_blkg(qg); 1046 u64 val = 0; 1047 1048 rq_wait_init(&qg->rq_wait); 1049 qg->rq_depth.queue_depth = blk_queue_depth(blkg->q); > 1050 qg->rq_depth.wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags); 1051 1052 while (blkg->parent) { 1053 struct qos_grp *this_qg = blkg_to_qg(blkg->parent); 1054 val = max(val, this_qg->set_min_lat_nsec); 1055 blkg = blkg->parent; 1056 } 1057 qg->set_min_lat_nsec = 0; 1058 qg->rq_depth.min_lat_nsec = val; 1059 } 1060 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip