xfs
[Top] [All Lists]

TAKE - Fix up return values out of xfs_write

Subject: TAKE - Fix up return values out of xfs_write
From: Eric Sandeen <sandeen@xxxxxxx>
Date: Fri, 2 Aug 2002 14:38:56 -0500
Sender: owner-linux-xfs@xxxxxxxxxxx
XFS generally lives with positive error values, and does not overload
returns to hold errors + bytes written.  Linux in general uses - errors
to overload returns.

xfs_write was returning positive values for errors -and- for bytes
written, which made it hard to distinguish EINVAL from 22 bytes
written, for example.   :(

Usually the switch-over is made in the "linvfs" functions, but in this
case it's going in xfs_write; xfs_read is already like this.

This fixes at least 1 bug of not failing correctly when attempting
unaligned direct IO writes.

Date:  Fri Aug  2 12:39:17 PDT 2002
Workarea:  
stout.americas.sgi.com:/localhome/src/sandeen/2.4.x-xfs/workarea-alwaysclean

The following file(s) were checked into:
  bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs


Modid:  2.4.x-xfs:slinx:124225a
linux/fs/xfs/xfs_dmapi.c - 1.75
        - Use ssize_t variable for return of xfs_read/write, not int

linux/fs/xfs/linux/xfs_lrw.c - 1.163
        - Make xfs_write return (-) errors and (+) bytes written.
          Fix comment on xfs_read about about return val (same as xfs_write).



<Prev in Thread] Current Thread [Next in Thread>
  • TAKE - Fix up return values out of xfs_write, Eric Sandeen <=