[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change in fsys_reiserfs.c

From: OKUJI Yoshinori
Subject: Re: Change in fsys_reiserfs.c
Date: Tue, 03 Oct 2000 09:12:48 +0900

From: "Jochen Hoenicke" <address@hidden>
Subject: Change in fsys_reiserfs.c
Date: Mon, 2 Oct 2000 18:10:45 +0200 (MET DST)

> >From the diff:
> -  if (! devread (superblock, 0, sizeof (struct reiserfs_super_block), 
> +  if (part_length < sizeof (struct reiserfs_super_block)
> +      || ! devread (superblock, 0, sizeof (struct reiserfs_super_block), 
> First, the check is wrong, it should be:
>   part_length <= superblock + (sizeof (struct reiserfs_super_block) >> 

  Thanks for pointing it out. I'll fix it.

> Second, devread already does the part_length check and returns with
> errnum = ERR_OUTSIDE_PART if the partition is too small.  If you just
> want to avoid the error message, I think it is cleaner to reset errnum
> if devread failed.  Or attempt_mount could clear errnum after each
> failed attempt.

  I disagree. The idea behind that is that we want to detect fatal
errors (e.g. we can't read the disk at all), while we want to ignore
that a partition doesn't have a certain filesystem. This is required
for detecting the filesystem of a partition automatically (if any),
and it is difficult to know what the error means in upper layeres. So
mount functions shouldn't set ERRNUM unnecessarily.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]