linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: linux-raid@vger.kernel.org
Cc: shli@fb.com, kernel-team@fb.com, dan.j.williams@intel.com,
	hch@infradead.org, liuzhengyuang521@gmail.com,
	liuzhengyuan@kylinos.cn, Song Liu <songliubraving@fb.com>
Subject: Re: [PATCH v5 6/8] md/r5cache: sysfs entry r5c_state
Date: Wed, 19 Oct 2016 13:19:30 +1100	[thread overview]
Message-ID: <87lgxlxeq5.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20161013054944.1038806-7-songliubraving@fb.com>

[-- Attachment #1: Type: text/plain, Size: 726 bytes --]

On Thu, Oct 13 2016, Song Liu wrote:

> r5c_state have 4 states:
> * no-cache;
> * write-through (write journal only);
> * write-back (w/ write cache);
> * cache-broken (journal missing or Faulty)

I don't like this.

We already have a mechanism for removing a failed device from
an array: write 'remove' to the 'state' file in the relevant dev-*
subdirectory.
You can also use that file to tell if the journal has failed.

Please call the file something a little more obvious that 'r5c_state',
maybe 'journal_mode', and use it only to switch between write-through
and write-back.
If there is no journal, then either remove the file, or have writes fail
and reads return something obvious ... maybe ENODEV.

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

  reply	other threads:[~2016-10-19  2:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13  5:49 [PATCH v5 0/8] raid5-cache: enabling cache features Song Liu
2016-10-13  5:49 ` [PATCH v5 1/8] md/r5cache: Check array size in r5l_init_log Song Liu
2016-10-13  5:49 ` [PATCH v5 2/8] md/r5cache: move some code to raid5.h Song Liu
2016-10-13  5:49 ` [PATCH v5 3/8] md/r5cache: State machine for raid5-cache write back mode Song Liu
2016-10-14  6:13   ` NeilBrown
2016-10-14  7:03     ` Song Liu
2016-10-13  5:49 ` [PATCH v5 4/8] md/r5cache: write part of r5cache Song Liu
2016-10-14  6:53   ` NeilBrown
2016-10-14  7:33     ` Song Liu
2016-10-19  0:53       ` NeilBrown
2016-10-21 20:42         ` Song Liu
2016-10-13  5:49 ` [PATCH v5 5/8] md/r5cache: reclaim support Song Liu
2016-10-19  2:03   ` NeilBrown
2016-10-21 21:04     ` Song Liu
2016-10-13  5:49 ` [PATCH v5 6/8] md/r5cache: sysfs entry r5c_state Song Liu
2016-10-19  2:19   ` NeilBrown [this message]
2016-10-21 21:20     ` Song Liu
2016-10-13  5:49 ` [PATCH v5 7/8] md/r5cache: r5c recovery Song Liu
2016-10-19  2:32   ` NeilBrown
2016-10-20  3:03   ` NeilBrown
2016-10-21 21:12     ` Song Liu
2016-10-26  1:18       ` NeilBrown
2016-10-13  5:49 ` [PATCH v5 8/8] md/r5cache: handle SYNC and FUA Song Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lgxlxeq5.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=dan.j.williams@intel.com \
    --cc=hch@infradead.org \
    --cc=kernel-team@fb.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=liuzhengyuan@kylinos.cn \
    --cc=liuzhengyuang521@gmail.com \
    --cc=shli@fb.com \
    --cc=songliubraving@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).