lkml.org 
[lkml]   [2008]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [SUGGESTION]: drop virtual merge accounting in I/O requests
Mikulas Patocka wrote:
>>> BTW. what should the block device driver do when it receives a mapping
>>> error? (if it aborts the request and it was write request, there will be
>>> data corruption).
>>
>> I'm not sure how a aborted request can corrupt data on disk.
>
> Writes are done by an async daemon and no one checks for their
> completion status. If there are three writes to directory, inode table
> and inode bitmap and one of these writes fail, there's no code to undo
> the other two. So the filesystem will be corrupted on write failure.

Normally journaling in ordered mode takes care of that. The transaction
is not committed until all earlier data has been successfully written.
And even the other fs typically turn the file system read only
on IO error to prevent further corruption.

Bigger issue is when the IOMMU mapping fails, but the driver doesn't have
error handling code. In the early days of the x86-64 GART IOMMU I managed
to corrupt a few super blocks this way because random data would be written then.

The block drivers have this pretty much all fixed these days, but in some other
areas (like network drivers) it looks much worse. So if your file system is
actually a network file system this might be a problem.

-Andi


\
 
 \ /
  Last update: 2008-07-15 14:23    [W:0.073 / U:2.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site