[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f875e2fe1003041023o5c6a3ddclb3d05033a4542eac@mail.gmail.com>
Date: Thu, 4 Mar 2010 13:23:40 -0500
From: s ponnusa <foosaa@...il.com>
To: Mike Hayward <hayward@...p.net>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-ide@...r.kernel.org, jens.axboe@...cle.com,
linux-mm@...ck.org
Subject: Re: Linux kernel - Libata bad block error handling to user mode
program
I have used O_DIRECT with aligned buffers of 4k size (the default
linux page size). I have even tried fadvise calls according to Linus's
suggestion of not using the O_DIRECT method. None of the above method
causes the write call to fail and media errors to be propagated to my
program. It is handled at the driver / kernel level (either by
retrying / remapping the sector).
Please advise.
Thanks.
On Thu, Mar 4, 2010 at 11:37 AM, Mike Hayward <hayward@...p.net> wrote:
> I always take it for granted, but forgot to mention, you should also
> use O_DIRECT to bypass the linux buffer cache. It often gets in the
> way of error propagation since it is changing your io requests into
> it's own page sized ios and will also "lie" to you about having
> written your data in the first place since it's a write back cache.
>
> The point is you have to disable all the caches everywhere or the
> error information will get absorbed by the caches.
>
> - Mike
>
--
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