lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1LEkaR-0007Mq-00@calista.eckenfels.net>
Date:	Mon, 22 Dec 2008 14:12:43 +0100
From:	Bernd Eckenfels <ecki@...a.inka.de>
To:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mmc_block: ensure all sectors that do not have errors are read

In article <494F7A02.2030302@...ia.com> you wrote:
> +               /*
> +                * After a read error, we redo the request one sector at a time
> +                * in order to accurately determine which sectors can be read
> +                * successfully.
> +                */
> +               if (disable_multi && brq.data.blocks > 1)
> +                       brq.data.blocks = 1;
> +
>                if (brq.data.blocks > 1) {
>                        /* SPI multiblock writes terminate using a special
>                         * token, not a STOP_TRANSMISSION request.

We would save an comparision here if we use it like this:

...
                if (brq.data.blocks > 1) {

                 /*
                  * After a read error, we redo the request one sector at a time
                  * in order to accurately determine which sectors can be read
                  * successfully.
                  */
                  if (disable_multi)
                    brq.data.blocks = 1;                        

                  /* SPI multiblock writes terminate using a special
...


> +               if (brq.cmd.error || brq.data.error || brq.stop.error) {
> +                       if (brq.data.blocks > 1 && rq_data_dir(req) == READ) {
> +                               /* Redo read one sector at a time */
> +                               printk(KERN_WARNING "%s: retrying using single "
> +                                      "block read\n", req->rq_disk->disk_name);
> +                               disable_multi = 1;
> +                               continue;
> +                       }

Will this flood the logs?

Gruss
Bernd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ