diff for duplicates of <1544570173.185366.397.camel@acm.org> diff --git a/a/1.txt b/N1/1.txt index c5fb325..6834d89 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,24 +1,24 @@ On Tue, 2018-12-11 at 18:03 -0500, Dennis Zhou wrote: -+AD4 diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c -+AD4 index 6bd0619a7d6e..c30661ddc873 100644 -+AD4 --- a/block/blk-cgroup.c -+AD4 +-+-+- b/block/blk-cgroup.c -+AD4 +AEAAQA -202,6 +-202,12 +AEAAQA static struct blkcg+AF8-gq +ACo-blkg+AF8-create(struct blkcg +ACo-blkcg, -+AD4 WARN+AF8-ON+AF8-ONCE(+ACE-rcu+AF8-read+AF8-lock+AF8-held())+ADs -+AD4 lockdep+AF8-assert+AF8-held(+ACY-q-+AD4-queue+AF8-lock)+ADs -+AD4 -+AD4 +- /+ACo request+AF8-queue is dying, do not create/recreate a blkg +ACo-/ -+AD4 +- if (blk+AF8-queue+AF8-dying(q)) +AHs -+AD4 +- ret +AD0 -ENODEV+ADs -+AD4 +- goto err+AF8-free+AF8-blkg+ADs -+AD4 +- +AH0 -+AD4 +- -+AD4 /+ACo blkg holds a reference to blkcg +ACo-/ -+AD4 if (+ACE-css+AF8-tryget+AF8-online(+ACY-blkcg-+AD4-css)) +AHs -+AD4 ret +AD0 -ENODEV+ADs +> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c +> index 6bd0619a7d6e..c30661ddc873 100644 +> --- a/block/blk-cgroup.c +> +++ b/block/blk-cgroup.c +> @@ -202,6 +202,12 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, +> WARN_ON_ONCE(!rcu_read_lock_held()); +> lockdep_assert_held(&q->queue_lock); +> +> + /* request_queue is dying, do not create/recreate a blkg */ +> + if (blk_queue_dying(q)) { +> + ret = -ENODEV; +> + goto err_free_blkg; +> + } +> + +> /* blkg holds a reference to blkcg */ +> if (!css_tryget_online(&blkcg->css)) { +> ret = -ENODEV; -What prevents that the queue state changes after blk+AF8-queue+AF8-dying() has returned -and before blkg+AF8-create() returns? Are you sure you don't need to protect this -code with a blk+AF8-queue+AF8-enter() / blk+AF8-queue+AF8-exit() pair? +What prevents that the queue state changes after blk_queue_dying() has returned +and before blkg_create() returns? Are you sure you don't need to protect this +code with a blk_queue_enter() / blk_queue_exit() pair? Bart. diff --git a/a/content_digest b/N1/content_digest index e958d24..3989d20 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -14,28 +14,28 @@ "\00:1\0" "b\0" "On Tue, 2018-12-11 at 18:03 -0500, Dennis Zhou wrote:\n" - "+AD4 diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c\n" - "+AD4 index 6bd0619a7d6e..c30661ddc873 100644\n" - "+AD4 --- a/block/blk-cgroup.c\n" - "+AD4 +-+-+- b/block/blk-cgroup.c\n" - "+AD4 +AEAAQA -202,6 +-202,12 +AEAAQA static struct blkcg+AF8-gq +ACo-blkg+AF8-create(struct blkcg +ACo-blkcg,\n" - "+AD4 \tWARN+AF8-ON+AF8-ONCE(+ACE-rcu+AF8-read+AF8-lock+AF8-held())+ADs\n" - "+AD4 \tlockdep+AF8-assert+AF8-held(+ACY-q-+AD4-queue+AF8-lock)+ADs\n" - "+AD4 \n" - "+AD4 +-\t/+ACo request+AF8-queue is dying, do not create/recreate a blkg +ACo-/\n" - "+AD4 +-\tif (blk+AF8-queue+AF8-dying(q)) +AHs\n" - "+AD4 +-\t\tret +AD0 -ENODEV+ADs\n" - "+AD4 +-\t\tgoto err+AF8-free+AF8-blkg+ADs\n" - "+AD4 +-\t+AH0\n" - "+AD4 +-\n" - "+AD4 \t/+ACo blkg holds a reference to blkcg +ACo-/\n" - "+AD4 \tif (+ACE-css+AF8-tryget+AF8-online(+ACY-blkcg-+AD4-css)) +AHs\n" - "+AD4 \t\tret +AD0 -ENODEV+ADs\n" + "> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c\n" + "> index 6bd0619a7d6e..c30661ddc873 100644\n" + "> --- a/block/blk-cgroup.c\n" + "> +++ b/block/blk-cgroup.c\n" + "> @@ -202,6 +202,12 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg,\n" + "> \tWARN_ON_ONCE(!rcu_read_lock_held());\n" + "> \tlockdep_assert_held(&q->queue_lock);\n" + "> \n" + "> +\t/* request_queue is dying, do not create/recreate a blkg */\n" + "> +\tif (blk_queue_dying(q)) {\n" + "> +\t\tret = -ENODEV;\n" + "> +\t\tgoto err_free_blkg;\n" + "> +\t}\n" + "> +\n" + "> \t/* blkg holds a reference to blkcg */\n" + "> \tif (!css_tryget_online(&blkcg->css)) {\n" + "> \t\tret = -ENODEV;\n" "\n" - "What prevents that the queue state changes after blk+AF8-queue+AF8-dying() has returned\n" - "and before blkg+AF8-create() returns? Are you sure you don't need to protect this\n" - "code with a blk+AF8-queue+AF8-enter() / blk+AF8-queue+AF8-exit() pair?\n" + "What prevents that the queue state changes after blk_queue_dying() has returned\n" + "and before blkg_create() returns? Are you sure you don't need to protect this\n" + "code with a blk_queue_enter() / blk_queue_exit() pair?\n" "\n" Bart. -49b33f9124ca2e97af973fd49b95a885a930554a19313976ce041b21e876ab7e +bf38e80633988ed51de52c63865c46594d057aad46807fc47aade8efd45b4e92
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.