NTFS suggestion?

From: Rogier Wolff (R.E.Wolff@BitWizard.nl)
Date: Sun May 14 2000 - 08:18:47 EST


In the "read" routine for ntfs, I see:

                if(error)/* FIXME: maybe return failure */
                {
                        ntfs_error("Read error\n");
                        dest->size=copied;
                        return 0;
                }

which I think should be:

                if(error)/* FIXME: maybe return failure */
                {
                        ntfs_error("Read error\n");
                        dest->size=copied;
                        if (copied) return 0;
                        else return error;
                }

This will return the error to the application on a read that gets
hit by an error.

For example reading 16k but hitting an error after 8k, will result in
read returning "8k" on the first read, and then "the error code" on the
next read.

With the current code, I would expect the "retry" of the application to
succeed with "copied==0" in essence getting EOF, and no error.

                        Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
*       Common sense is the collection of                                *
******  prejudices acquired by age eighteen.   -- Albert Einstein ********

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:24 EST