[U-Boot] [PATCH v2 2/3] fs/fat: Improve error handling

Wolfgang Denk wd at denx.de
Thu Jan 5 17:15:00 CET 2012


Dear Kyle Moffett,

In message <1324487292-7299-3-git-send-email-Kyle.D.Moffett at boeing.com> you wrote:
> The FAT filesystem fails silently in inexplicable ways when given a
> filesystem with a block-size that does not match the device sector size.
> In theory this is not an unsupportable combination but requires a major
> rewrite of a lot of the filesystem.  Until that occurs, the filesystem
> should detect that scenario and display a helpful error message.
> 
> This scenario in particular occurred on a 512-byte blocksize FAT fs
> stored in an El-Torito boot volume on a CD-ROM (2048-byte sector size).
> 
> Additionally, in many circumstances the ->block_read method will not
> return a negative number to indicate an error but instead return 0 to
> indicate the number of blocks successfully read (IE: None).
> 
> The FAT filesystem should defensively check to ensure that it got all of
> the sectors that it asked for when reading.
> 
> Signed-off-by: Kyle Moffett <Kyle.D.Moffett at boeing.com>
> 
> --
> 
> v2: No change
> 
> ---
>  fs/fat/fat.c |   18 ++++++++++++++----
>  1 files changed, 14 insertions(+), 4 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
CONSUMER NOTICE:  Because  of  the  "Uncertainty  Principle,"  It  Is
Impossible  for  the  Consumer  to  Find  Out  at  the Same Time Both
Precisely Where This Product Is and How Fast It Is Moving.


More information about the U-Boot mailing list