lkml.org 
[lkml]   [2002]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] struct super_block cleanup - msdos/vfat
OGAWA Hirofumi wrote:
> Brian Gerst <bgerst@didntduck.org> writes:
>
>
>>OGAWA Hirofumi wrote:
>>
>>>OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> writes:
>>>
>>>
>>>>Hi,
>>>>
>>>>Brian Gerst <bgerst@didntduck.org> writes:
>>>>
>>>>
>>>>
>>>>>diff -urN linux-2.5.7-pre1/fs/msdos/namei.c linux/fs/msdos/namei.c
>>>>>--- linux-2.5.7-pre1/fs/msdos/namei.c Thu Mar 7 21:18:32 2002
>>>>>+++ linux/fs/msdos/namei.c Wed Mar 13 08:20:12 2002
>>>>>@@ -603,17 +603,14 @@
>>>>>int msdos_fill_super(struct super_block *sb,void *data, int silent)
>>>>>{
>>>>>- struct super_block *res;
>>>>>+ int res;
>>>>>- MSDOS_SB(sb)->options.isvfat = 0;
>>>>>- res = fat_read_super(sb, data, silent, &msdos_dir_inode_operations);
>>>>>- if (IS_ERR(res))
>>>>>- return PTR_ERR(res);
>>>>>- if (res == NULL) {
>>>>>+ res = fat_fill_super(sb, data, silent, &msdos_dir_inode_operations, 0);
>>>>>+ if (res) {
>>>>> if (!silent)
>>>>> printk(KERN_INFO "VFS: Can't find a valid"
>>>>> " MSDOS filesystem on dev %s.\n", sb->s_id);
>>>>
>>>>If the error is I/O error, I think we shouldn't output this message.
>>>
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>If the error is except -EINVAL,
>>>Sorry.
>>>
>>>
>>>>What do you think about this?
>>>
>>Why not? The statement is true, and other filesystems do complain
>>when there is an I/O error.
>
>
> Umm, almost all filesystems doesn't output this message when the I/O error
> occurs, AFAIK.
>
> I think that this message indicate that a device isn't a FAT
> filesystem. And, of course, if error is the I/O error,
> fat_full_super() can't detect whether it is FAT filesystem or not.

Patch attached.

--

Brian Gerst
diff -urN linux/fs/msdos/namei.c linux2/fs/msdos/namei.c
--- linux/fs/msdos/namei.c Thu Mar 14 10:53:20 2002
+++ linux2/fs/msdos/namei.c Thu Mar 14 10:54:53 2002
@@ -607,7 +607,7 @@

res = fat_fill_super(sb, data, silent, &msdos_dir_inode_operations, 0);
if (res) {
- if (!silent)
+ if (res == -EINVAL && !silent)
printk(KERN_INFO "VFS: Can't find a valid"
" MSDOS filesystem on dev %s.\n", sb->s_id);
return res;
diff -urN linux/fs/vfat/namei.c linux2/fs/vfat/namei.c
--- linux/fs/vfat/namei.c Thu Mar 14 10:53:20 2002
+++ linux2/fs/vfat/namei.c Thu Mar 14 10:55:20 2002
@@ -1290,7 +1290,7 @@

res = fat_fill_super(sb, data, silent, &vfat_dir_inode_operations, 1);
if (res) {
- if (!silent)
+ if (res == -EINVAL && !silent)
printk(KERN_INFO "VFS: Can't find a valid"
" VFAT filesystem on dev %s.\n", sb->s_id);
return res;
\
 
 \ /
  Last update: 2005-03-22 13:25    [from the cache]
©2003-2011 Jasper Spaans