Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.5/8.12.5) with ESMTP id g72JfCRw013364 for ; Fri, 2 Aug 2002 12:41:12 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.5/8.12.3/Submit) id g72JfCIt013363 for linux-xfs-outgoing; Fri, 2 Aug 2002 12:41:12 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-linux-xfs@oss.sgi.com using -f Received: from zeus-e8.americas.sgi.com ([198.149.7.250]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g72Jf5Rw013335 for ; Fri, 2 Aug 2002 12:41:05 -0700 Received: from daisy-e185.americas.sgi.com (daisy-e185.americas.sgi.com [128.162.185.214]) by zeus-e8.americas.sgi.com (SGI-SGI-8.9.3/americas-smart-nospam1.1) with ESMTP id OAA87133 for ; Fri, 2 Aug 2002 14:42:40 -0500 (CDT) Received: from stout.americas.sgi.com (stout.americas.sgi.com [128.162.187.5]) by daisy-e185.americas.sgi.com (SGI-8.9.3/SGI-server-1.8) with ESMTP id OAA85370 for ; Fri, 2 Aug 2002 14:42:40 -0500 (CDT) From: Eric Sandeen Received: by stout.americas.sgi.com (8.11.6/SGI-client-1.7) id g72Jcuq08306; Fri, 2 Aug 2002 14:38:56 -0500 Message-Id: <200208021938.g72Jcuq08306@stout.americas.sgi.com> Date: Fri, 2 Aug 2002 14:38:56 -0500 Subject: TAKE - Fix up return values out of xfs_write X-Spam-Status: No, hits=0.9 required=5.0 tests=MISSING_HEADERS version=2.20 X-Spam-Level: Sender: owner-linux-xfs@oss.sgi.com Precedence: bulk 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).