kernel_optimize_test/fs/orangefs
Mike Marshall 97f100277c Orangefs: de-uglify orangefs_devreq_writev, and devorangefs-req.c in general
AV dislikes many parts of orangefs_devreq_writev. Besides making
orangefs_devreq_writev more easily readable and better commented,
this patch makes an effort to address some of the problems:

 > The 5th is quietly ignored unless trailer_size is positive and
 > status is zero. If trailer_size > 0 && status == 0, you verify that
 > the length of the 5th segment is no more than trailer_size and copy
 > it to vmalloc'ed buffer. Without bothering to zero the rest of that
 > buffer out.

It was just wrong to allow a 5th segment that is not exactly equal to
trailer_size. Now that that's fixed, there's nothing to zero out in
the vmalloced buffer - it is exactly the right size to hold the
5th segment.

 > Another API bogosity: when the 5th segment is present, successful writev()
 > returns the sum of sizes of the first 4.

Added size of 5th segment to writev return...

 > if concatenation of the first 4 segments is longer than
 > 16 + sizeof(struct pvfs2_downcall_s) by no more than sizeof(long) => whine
 > and proceed with garbage.

If 4th segment isn't exactly sizeof(struct pvfs2_downcall_s), whine and fail.

 > if the 32bit value 4 bytes into op->downcall is zero and 64bit
 > value following it is non-zero, the latter is interpreted as the size of
 > trailer data.

The latter is what userspace claimed was the length of the trailer data.
The kernel module now compares it to the trailer iovec's iov_len as a
sanity check.

 > if there's no trailer, the 5th segment (if present) is completely ignored.

Whine and fail if there should be no trailer, yet a 5th segment is present.

 > if vmalloc fails, act as if status (32bit at offset 5 into
 > op->downcall) had been -ENOMEM and don't look at the 5th segment at all.

whine and fail with -ENOMEM.

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-12-14 13:32:05 -05:00
..
acl.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
dcache.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
devorangefs-req.c Orangefs: de-uglify orangefs_devreq_writev, and devorangefs-req.c in general 2015-12-14 13:32:05 -05:00
dir.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
downcall.h OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS. 2015-12-03 14:45:44 -05:00
file.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
inode.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
Kconfig Orangefs: kernel client part 7 2015-10-03 11:40:00 -04:00
Makefile Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
namei.c Orangefs: don't keep checking stuff in on Friday afternoon. 2015-12-11 10:46:22 -05:00
orangefs-bufmap.c Orangefs: improve comments 2015-12-11 10:50:42 -05:00
orangefs-bufmap.h Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-cache.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-debug.h Orangef: remove overlooked old-style userspace debug parts 2015-12-11 11:00:12 -05:00
orangefs-debugfs.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-debugfs.h Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-dev-proto.h Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-kernel.h Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-mod.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-sysfs.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-sysfs.h Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-utils.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
protocol.h Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
super.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
symlink.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
upcall.h OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS. 2015-12-03 14:45:44 -05:00
waitqueue.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
xattr.c Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00