From: Stefan Weinhuber <WEIN@de.ibm.com> To: Nicholas Krause <xerofoify@gmail.com> Cc: BOEBLINGEN LINUX390 <LINUX390@de.ibm.com>, heicars2@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, mschwid2@linux.vnet.ibm.com, Stefan Haberland1 <stefan.haberland@de.ibm.com> Subject: Re: [PATCH] s390: Fix me in dasd_eer.c Date: Mon, 28 Jul 2014 18:02:13 +0200 [thread overview] Message-ID: <OF27B55084.24F3FB57-ONC1257D23.0054AF74-C1257D23.0058198E@de.ibm.com> (raw) In-Reply-To: <1406010572-13217-1-git-send-email-xerofoify@gmail.com> Nicholas Krause <xerofoify@gmail.com> wrote on 2014-07-22 08:29:32: [..] > Subject: > > [PATCH] s390: Fix me in dasd_eer.c > > This patch changes return type to EMEDUIMTYPE in function, dasd_eer_enable > for when checking if the medium has no errors according to this function. > > Signed-off-by: Nicholas Krause <xerofoify@gmail.com> > --- > drivers/s390/block/dasd_eer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c > index 21ef63c..08ee040 100644 > --- a/drivers/s390/block/dasd_eer.c > +++ b/drivers/s390/block/dasd_eer.c > @@ -462,7 +462,7 @@ int dasd_eer_enable(struct dasd_device *device) > return 0; > > if (!device->discipline || strcmp(device->discipline->name, "ECKD")) > - return -EPERM; /* FIXME: -EMEDIUMTYPE ? */ > + return -EMEDIUMTYPE; /* FIXME: -EMEDIUMTYPE ? */ > > cqr = dasd_kmalloc_request(DASD_ECKD_MAGIC, 1 /* SNSS */, > SNSS_DATA_SIZE, device); > -- > 1.9.1 > Hm, after some consideration, I have to disagree with your suggestion. If you try to enable EER on an FBA device, you will get the following result with current code: $ echo 1 > eer_enabled -bash: echo: write error: Operation not permitted and with your code the following: $ echo 1 > eer_enabled -bash: echo: write error: Wrong medium type When I wrote this code, I was not sure which one is better. But today I say that the 'Operation not permitted' is more to the point. An FBA device has no (changable) medium, so what could be wrong about its type? Could be confusing. >From your patch description I do not really get why you want to change the return code. Why do you think that EMEDIUMTYPE is better than EPERM? Mit freundlichen Grüßen / Kind regards Stefan Weinhuber
WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weinhuber <WEIN@de.ibm.com> To: Nicholas Krause <xerofoify@gmail.com> Cc: BOEBLINGEN LINUX390 <LINUX390@de.ibm.com>, heicars2@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, mschwid2@linux.vnet.ibm.com, Stefan Haberland1 <stefan.haberland@de.ibm.com> Subject: Re: [PATCH] s390: Fix me in dasd_eer.c Date: Mon, 28 Jul 2014 18:02:13 +0200 [thread overview] Message-ID: <OF27B55084.24F3FB57-ONC1257D23.0054AF74-C1257D23.0058198E@de.ibm.com> (raw) In-Reply-To: <1406010572-13217-1-git-send-email-xerofoify@gmail.com> Nicholas Krause <xerofoify@gmail.com> wrote on 2014-07-22 08:29:32: [..] > Subject: > > [PATCH] s390: Fix me in dasd_eer.c > > This patch changes return type to EMEDUIMTYPE in function, dasd_eer_enable > for when checking if the medium has no errors according to this function. > > Signed-off-by: Nicholas Krause <xerofoify@gmail.com> > --- > drivers/s390/block/dasd_eer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c > index 21ef63c..08ee040 100644 > --- a/drivers/s390/block/dasd_eer.c > +++ b/drivers/s390/block/dasd_eer.c > @@ -462,7 +462,7 @@ int dasd_eer_enable(struct dasd_device *device) > return 0; > > if (!device->discipline || strcmp(device->discipline->name, "ECKD")) > - return -EPERM; /* FIXME: -EMEDIUMTYPE ? */ > + return -EMEDIUMTYPE; /* FIXME: -EMEDIUMTYPE ? */ > > cqr = dasd_kmalloc_request(DASD_ECKD_MAGIC, 1 /* SNSS */, > SNSS_DATA_SIZE, device); > -- > 1.9.1 > Hm, after some consideration, I have to disagree with your suggestion. If you try to enable EER on an FBA device, you will get the following result with current code: $ echo 1 > eer_enabled -bash: echo: write error: Operation not permitted and with your code the following: $ echo 1 > eer_enabled -bash: echo: write error: Wrong medium type When I wrote this code, I was not sure which one is better. But today I say that the 'Operation not permitted' is more to the point. An FBA device has no (changable) medium, so what could be wrong about its type? Could be confusing. From your patch description I do not really get why you want to change the return code. Why do you think that EMEDIUMTYPE is better than EPERM? Mit freundlichen Grüßen / Kind regards Stefan Weinhuber
next prev parent reply other threads:[~2014-07-28 16:02 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-07-22 6:29 [PATCH] s390: Fix me in dasd_eer.c Nicholas Krause 2014-07-23 12:18 ` One Thousand Gnomes 2014-07-23 15:41 ` Nick Krause 2014-07-28 16:02 ` Stefan Weinhuber [this message] 2014-07-28 16:02 ` Stefan Weinhuber 2014-07-28 16:06 ` Nick Krause 2014-07-28 16:06 ` Nick Krause
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=OF27B55084.24F3FB57-ONC1257D23.0054AF74-C1257D23.0058198E@de.ibm.com \ --to=wein@de.ibm.com \ --cc=LINUX390@de.ibm.com \ --cc=heicars2@linux.vnet.ibm.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-s390@vger.kernel.org \ --cc=mschwid2@linux.vnet.ibm.com \ --cc=stefan.haberland@de.ibm.com \ --cc=xerofoify@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.