mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Question regarding direntry read error in fat filesystem when a  device is removed
@ 2009-03-04  6:00 YS Kim
  0 siblings, 0 replies; 2+ messages in thread
From: YS Kim @ 2009-03-04  6:00 UTC (permalink / raw)
  To: linux-kernel

Hi,

I have a question about too many error messages from FAT when
unexpected device removal occurs.
I got the following error messages when I unplugged a USB
drive(formatted as FAT) during direntry reading.

sd 0:0:0:0: rejecting I/O to device being removed
FAT: Directory bread(block 1478192) failed
sd 0:0:0:0: rejecting I/O to device being removed
FAT: Directory bread(block 1478193) failed
sd 0:0:0:0: rejecting I/O to device being removed
FAT: Directory bread(block 1478194) failed
sd 0:0:0:0: rejecting I/O to device being removed
FAT: Directory bread(block 1478195) failed
...

>From the code of fat__get_entry in dir.c, I found that it continues to
read the next device block
even if the block reading has been failed. Because of this continuous
read, a lot of error messages
come up if the device itself is removed during reading fairly many
files, and it causes the malfunction
of my embedded system.

I think this code is to make the filesystem available to read the next
block when a storage contains
bad blocks, so that a user can backup remainings in case that some
portion of a storage are dead.

However, if the storage is a NAND flash memory, the flash driver is
supposed to perform bad block
management (because of the NAND charateristics) before the filesystem
encounters the bad block.

Thus, if I modify the code to just return error when fat__get_entry
fails to read blocks, could it be
cause any side effects? Except the purpose of backup/recovery, is
there any other reason for
the continuous block read?

^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <cbSsR-2ry-1@gated-at.bofh.it>]

end of thread, other threads:[~2009-03-08 13:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-04  6:00 Question regarding direntry read error in fat filesystem when a device is removed YS Kim
     [not found] <cbSsR-2ry-1@gated-at.bofh.it>
2009-03-08 13:29 ` Bodo Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®