summaryrefslogtreecommitdiffstats
path: root/fs/orangefs
Commit message (Collapse)AuthorAgeFilesLines
...
* orangefs: Do not unref if there is no bufmap.Martin Brandenburg2015-12-171-8/+19
| | | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com> Signed-off-by: Martin Brandenburg <martin@omnibond.com>
* orangefs: Remove useless inline qualifier from bufmap functions.Martin Brandenburg2015-12-172-6/+2
| | | | | | | | | | | All callers were outside of the file these functions were declared in, so nothing was ever inlined anyway. Further this happens before I/O and any speedup by not having to do a call will be dwarfed by the time it takes to talk to the server. Signed-off-by: Mike Marshall <hubcap@omnibond.com> Signed-off-by: Martin Brandenburg <martin@omnibond.com>
* orangefs: Change visibility of several bufmap helpers to static.Martin Brandenburg2015-12-172-13/+10
| | | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com> Signed-off-by: Martin Brandenburg <martin@omnibond.com>
* orangefs: Remove ``aligned'' upcall and downcall length macros.Martin Brandenburg2015-12-173-26/+8
| | | | | | | | | | There was previously MAX_ALIGNED_DEV_REQ_(UP|DOWN)SIZE macros which evaluated to MAX_DEV_REQ_(UP|DOWN)SIZE+8. As it is unclear what this is for, other than creating a situation where we accept more data than we can parse, it is removed. Signed-off-by: Mike Marshall <hubcap@omnibond.com> Signed-off-by: Martin Brandenburg <martin@omnibond.com>
* Orangefs: do not finalize bufmap if it was never initialized.Martin Brandenburg2015-12-151-2/+9
| | | | | | | Found by the infant Orangefs fuzzer... Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: Don't wait the old-fashioned way.Mike Marshall2015-12-143-43/+26
| | | | | | | Get rid of add_wait_queue, set_current_state, etc, and use the wait_event() model. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: de-uglify orangefs_devreq_writev, and devorangefs-req.c in generalMike Marshall2015-12-141-99/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Orangef: remove overlooked old-style userspace debug partsMike Marshall2015-12-111-201/+1
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: improve commentsMike Marshall2015-12-111-3/+6
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: don't keep checking stuff in on Friday afternoon.Mike Marshall2015-12-111-1/+1
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: don't expose internal details of pathname resolution to userspace.Mike Marshall2015-12-041-1/+1
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: change pvfs2 filenames to orangefsMike Marshall2015-12-0425-46/+46
| | | | | | | Also changed references within source files that referred to header files whose names had changed. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS.Yi Liu2015-12-0325-1785/+1785
| | | | | | | | | | | | | | | | | | | | | | OrangeFS was formerly known as PVFS2 and retains the name in many places. I leave the device /dev/pvfs2-req since this affects userspace. I leave the filesystem type pvfs2 since this affects userspace. Further the OrangeFS sysint library reads fstab for an entry of type pvfs2 independently of kernel mounts. I leave extended attribute keys user.pvfs2 and system.pvfs2 as the sysint library understands these. I leave references to userspace binaries still named pvfs2. I leave the filenames. Signed-off-by: Yi Liu <yi9@clemson.edu> [martin@omnibond.com: clairify above constraints and merge] Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* fs: out of bounds on stack in iov_iter_advanceAl Viro2015-11-163-46/+30
| | | | | | | | | | | | | On Wed, Nov 11, 2015 at 10:19:48AM +0000, Al Viro wrote: > I'll cook the minimal fixup for API change after I get some sleep and > send it your way, unless somebody gets there first... This should do it - switches ->ioctl() to pvfs2_inode_[gs]etxattr() and converts xattr_handler ->[gs]et() to new API. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: Clean up pvfs2_devreq_read.Martin Brandenburg2015-11-131-90/+117
| | | | | | | | | | | | | * Kick invalid arguments out early, so handling them does not clutter the code. * Avoid possibility of race by not releasing lock until completely done. * Do not leak ops (memory) in certain error condition. * Check for more error conditions. * Put module name in all error and debug logs. * Document behavior. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: Remove upcall trailers which are not used.Martin Brandenburg2015-11-136-128/+36
| | | | | | | | Also removes remnants of iox (readx/writex) which previously used trailers, but no longer exist. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: fix gossip statementMike Marshall2015-11-131-1/+1
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: Remove unused #defines from signal blocking code.Martin Brandenburg2015-11-131-2/+0
| | | | | Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: set pos after generic_write_checksMike Marshall2015-11-131-1/+8
| | | | | | | if we are appending, generic_write_checks would have updated pos to the end of the file... Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: validate the response in decode_dirents()Al Viro2015-11-131-5/+32
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: don't leave uninitialized data in ->trailer_bufAl Viro2015-11-131-9/+11
| | | | | | | minimal fix; it would be better to reject such requests outright. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: get rid of dec_string and enc_stringAl Viro2015-11-132-23/+8
| | | | | | | | The latter is never used, the former has one user and would be better off spelled out right there. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: switch decode_dirents() to use of kcalloc()Al Viro2015-11-131-1/+1
| | | | | | | gets rid of multiplication overflow Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: sanitize pvfs2_convert_time_field()Al Viro2015-11-132-12/+6
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: kill pointless ->link() and ->mknod()Al Viro2015-11-131-23/+0
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* pvfs2_fill_sb(): use kzalloc()Al Viro2015-11-131-2/+1
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: kill struct pvfs2_mount_sb_info_sAl Viro2015-11-132-30/+9
| | | | | | | | | The only reason for that thing used to be the API of mount_nodev() callback; since we are calling pvfs2_fill_sb() ourselves now, we don't have to shove everything into a single structure. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: double iput() in case of d_make_root() failureAl Viro2015-11-131-3/+1
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: use get_user_pages_fast(), not get_user_pages()Al Viro2015-11-131-10/+2
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: kill kmap/kunmap wrappersAl Viro2015-11-131-3/+0
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: make pvfs2_inode_read() take iov_iterAl Viro2015-11-133-21/+11
| | | | | | | | | | ... and make the only caller use page-backed iov_iter, getting rid of kmap/kunmap *and* of the bug with attempted use of iovec-backed copy_page_to_iter() on a kernel pointer. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: make do_readv_writev() take iov_iterAl Viro2015-11-131-22/+9
| | | | | | | | | | no need to build a copy of what the caller already has; what's more, we want the one given to caller properly advanced *and* we shouldn't depend upon it being an iovec-backed one. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: don't bother with splitting iovecsAl Viro2015-11-131-276/+6
| | | | | | | | copy_page_{to,from}_iter() advances it just fine *and* it has no problem with partially consumed segments. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: make wait_for_direct_io() take iov_iterAl Viro2015-11-131-12/+13
| | | | | | | | | | | incidentally, insane or compromised server returning *more* than requested on read should not oops the kernel - initialize the iov_iter for read according to the iovec we've got. That's why pvfs_bufmap_copy_to_iovec() needed a separate size argument - we shouldn't abuse iov_iter_count(iter) for passing that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: make precopy_buffers() take iov_iterAl Viro2015-11-131-8/+5
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: make postcopy_buffers() take iov_iterAl Viro2015-11-131-9/+5
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* pvfs_bufmap_copy_from_iovec(): don't rely upon size being equal to ↵Al Viro2015-11-131-12/+11
| | | | | | | iov_iter_count(iter) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: explicitly pass the size to pvfs_bufmap_copy_to_iovec()Al Viro2015-11-133-16/+19
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: fix some checkpatch.pl complaints that had creeped in.Mike Marshall2015-10-0511-102/+111
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: Clean up error decoding.Martin Brandenburg2015-10-032-264/+80
| | | | | | | | | Errors from the server need to be decoded. A bunch of code was imported from the server to do this but much of it is convoluted and not even needed. The result is better but still as convoluted as required by the protocol. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: Use readonly mmap since writepage is not implemented.Martin Brandenburg2015-10-031-1/+3
| | | | | | | | Previously the code silently failed to update the disk. Now it will not allow writable and shared mmaps. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: don't use mount_nodev, use sget directly.Mike Marshall2015-10-031-20/+15
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: update signal blocking code before Oleg sees it.Mike Marshall2015-10-033-31/+20
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: Don't opencode memcpy.Mike Marshall2015-10-031-11/+2
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: choose return codes from among the expected ones.Mike Marshall2015-10-032-9/+5
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: put PVFS_util_min out of its misery.Mike Marshall2015-10-031-1/+0
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: fix dir_emit code in pvfs2_readdir.Mike Marshall2015-10-032-82/+50
| | | | | | | Al Viro glanced at readdir and surmised that getdents would misbehave the way it was written... and sure enough. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: use iov_iter interfaceMike Marshall2015-10-033-510/+72
| | | | | | | | | | replace opencoded pvfs_bufmap_copy_to_kernel_iovec, pvfs_bufmap_copy_to_user_iovec, pvfs_bufmap_copy_iovec_from_kernel, and pvfs_bufmap_copy_iovec_from_user with pvfs_bufmap_copy_to_iovec and pvfs_bufmap_copy_from_iovec, which both use the iov_iter interface. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: Swap order of include filesGuenter Roeck2015-10-031-1/+1
| | | | | | | | | | | | | | | spinlock_types.h requires types from linux/types.h. Including spinlock_types.h first may result in the following build errors, as seen with arm:allmodconfig. arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32' arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16' Fixes: deb4fb58ff73 ("Orangefs: kernel client part 2") Cc: Mark Brown <broonie@kernel.org> Cc: Mike Marshall <hubcap@omnibond.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* fs: orangefs: remove execute priviliges from module paramsSasha Levin2015-10-031-1/+1
| | | | | | | This makes no sense and causes warnings on boot. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
OpenPOWER on IntegriCloud