* Re: Invalidating the pages read from a disk which md marks as faulty later
[not found] <CAHhTtBVqgv1Spgvkux55-K=y7CEYWs1qFQHXDSU_Kwu_NsuTaQ@mail.gmail.com>
@ 2012-01-18 20:19 ` NeilBrown
2012-03-27 11:35 ` Alexander Lyakas
0 siblings, 1 reply; 2+ messages in thread
From: NeilBrown @ 2012-01-18 20:19 UTC (permalink / raw)
To: Krishnakumar R; +Cc: linux-raid
[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]
On Wed, 18 Jan 2012 20:11:38 +0530 Krishnakumar R
<krishnakumar.kernel@gmail.com> wrote:
> Hi,
>
> Does md invalidate the pages in the page cache for data read (earlier) from
> the disk, which md finds faulty, lets say due to an I/O error ?
> The assumption here is that since md found a disk to be faulty, the data
> which was earlier read and cached can be considered invalid. Thoughts ?
> I would assume that the pages would be backed by md device, hence is it
> possible to figure out which pages were given out with data from an
> underlying disk inorder to invalidate them ?
>
>
Sorry, but this doesn't make any sense.
When you read from a disk, the disk drive itself does a CRC check to confirm
the data is valid. It if isn't you don't get to see the data. If it is, why
would you want to invalidate it?
If a device is "Faulty", that doesn't mean it has corrupted data. It means
it has inaccessible on unchangeable data.
Though I might have misunderstood you. If you think I have, please give a
more detailed scenario of the situation that should be handled differently.
In any case, once md has returned the data to the caller there is nothing it
can do to "invalidate" it.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Invalidating the pages read from a disk which md marks as faulty later
2012-01-18 20:19 ` Invalidating the pages read from a disk which md marks as faulty later NeilBrown
@ 2012-03-27 11:35 ` Alexander Lyakas
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Lyakas @ 2012-03-27 11:35 UTC (permalink / raw)
To: NeilBrown; +Cc: Krishnakumar R, linux-raid
Hi,
one issue that I hit, although not with md, is that Linux page cache
is capable of caching error'ed pages too. So even after the underlying
device recovers, the page cache keeps returning EIO for some time,
until it re-reads the page. To resolve this, it is either required to
close all open fds (opened with filp_open) or to issue
ioctl(BLKFLSBUF) to the file.
Perhaps that is what is meant here. Although I don't think md uses
Linux page cache to work with its components.
Alex.
On Wed, Jan 18, 2012 at 10:19 PM, NeilBrown <neilb@suse.de> wrote:
> On Wed, 18 Jan 2012 20:11:38 +0530 Krishnakumar R
> <krishnakumar.kernel@gmail.com> wrote:
>
>> Hi,
>>
>> Does md invalidate the pages in the page cache for data read (earlier) from
>> the disk, which md finds faulty, lets say due to an I/O error ?
>> The assumption here is that since md found a disk to be faulty, the data
>> which was earlier read and cached can be considered invalid. Thoughts ?
>> I would assume that the pages would be backed by md device, hence is it
>> possible to figure out which pages were given out with data from an
>> underlying disk inorder to invalidate them ?
>>
>>
>
> Sorry, but this doesn't make any sense.
>
> When you read from a disk, the disk drive itself does a CRC check to confirm
> the data is valid. It if isn't you don't get to see the data. If it is, why
> would you want to invalidate it?
>
> If a device is "Faulty", that doesn't mean it has corrupted data. It means
> it has inaccessible on unchangeable data.
>
> Though I might have misunderstood you. If you think I have, please give a
> more detailed scenario of the situation that should be handled differently.
>
> In any case, once md has returned the data to the caller there is nothing it
> can do to "invalidate" it.
>
> NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-27 11:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAHhTtBVqgv1Spgvkux55-K=y7CEYWs1qFQHXDSU_Kwu_NsuTaQ@mail.gmail.com>
2012-01-18 20:19 ` Invalidating the pages read from a disk which md marks as faulty later NeilBrown
2012-03-27 11:35 ` Alexander Lyakas
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).