On Fri, 2005-07-29 at 16:58 +0200, Szakacsits Szabolcs wrote:
> On Fri, 29 Jul 2005, Yura Pakhuchiy wrote:
>
> > - if (ntfs_check_logfile(na) && ntfs_is_logfile_clean(na))
> > - ret = 0;
> > - else {
> > - ret = -1;
> > - err = EIO;
> > - }
> > + if (!ntfs_check_logfile(na) || !ntfs_is_logfile_clean(na))
> > + err = EOPNOTSUPP;
>
> I don't like this very much. Now users would get the message that mounting
> NTFS is not supported and that's pretty bogus. EIO covered the issue much
> more better.
I don't think so. We should return EIO on real errors (eg. damaged
volume), but unclean logfile it's not damaged volume, it's simply case
that we don't support yet. So I think that EOPNOTSUPP is absolutely
correct here.
> The change also "breaks" ntfsresize. Currently users get this message for
> EIO:
>
> "Apparently you have a corrupted NTFS. Please run the filesystem checker\n"
> "on Windows by invoking chkdsk /f. Don't forget the /f (force) parameter,\n"
> "it's important! You probably also need to reboot Windows to take effect.\n"
> "Then you can try ntfsresize again. No modification was made to your NTFS.\n";
>
> This always helped in the past. Now they would get only the "not supported
> message". It would be too confusing.
BTW, mount fails with EOPNOTSUPP only in case unclean logfile, so you
can print above message in this case too. All other utils will print
correct message due to changes in volume.c.
--
Best regards,
Yura
|