public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: weiping zhang <zwp10758@gmail.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	weiping zhang <zhangweiping@didichuxing.com>,
	jejb@linux.vnet.ibm.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2] scsi: sd: add new match array for cache_type
Date: Mon, 22 Jan 2018 19:23:47 -0500	[thread overview]
Message-ID: <yq11sihjucs.fsf@oracle.com> (raw)
In-Reply-To: <CAA70yB4EfEywgi-MTJg8b4jhGU_iOCH4UZe7vuA3WBjxz3Hw6g@mail.gmail.com> (weiping zhang's message of "Fri, 19 Jan 2018 12:46:13 +0800")


Hi Weiping,

> currently, there are four combinations as following: "write through",
> "none", "write back", "write back, no read (daft)"
>
> cache_type can control both write and read cache, but for "write
> through" and "write back" we can not know clearly how to control the
> read cache.

That's what I meant by using the term "arcane" and alluding to the fact
that this interface is not well enough documented.

> I prefer use words like"w0r1", "w0r0", "w1r1", "w1r0", that "1" means
> enable, "0" means disable. The user know clearly what they are doing
> when typing these short words.

We can't change the existing interface without breaking stuff. We can
entertain adding stuff, but I do think that a better solution is to
document what's there so the effect of echoing each of the following
strings becomes crystal clear:

static const char *sd_cache_types[] = {
        "write through", "none", "write back",
        "write back, no read (daft)"
};

I would also like to see the "temporary" string documented.

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2018-01-23  0:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 14:19 [PATCH v2] scsi: sd: add new match array for cache_type weiping zhang
2018-01-18 16:30 ` James Bottomley
2018-01-19  2:41 ` Martin K. Petersen
2018-01-19  4:46   ` weiping zhang
2018-01-23  0:23     ` Martin K. Petersen [this message]
2018-01-23 14:32       ` weiping zhang

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=yq11sihjucs.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=zhangweiping@didichuxing.com \
    --cc=zwp10758@gmail.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