aboutsummaryrefslogtreecommitdiffstats
path: root/fs/orangefs/file.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-07-05orangefs: Remove useless xattr prefix argumentsAndreas Gruenbacher1-2/+0
Mike, On Fri, Jun 3, 2016 at 9:44 PM, Mike Marshall <hubcap@omnibond.com> wrote: > We use the return value in this one line you changed, our userspace code gets > ill when we send it (-ENOMEM +1) as a key length... ah, my mistake. Here's a fixed version. Thanks, Andreas Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-07-05orangefs: Remove useless definesAndreas Gruenbacher1-2/+2
The ORANGEFS_XATTR_INDEX_ defines are unused; the ORANGEFS_XATTR_NAME_ defines only obfuscate the code. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-05-02orangefs: don't open-code inode_lock/inode_unlockAl Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2016-03-25orangefs: fix do_readv_writev() handling of error halfway throughAl Viro1-1/+1
Error should only be returned if nothing had been read/written. Otherwise we need to report a short read/write instead. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-03-25orangefs: sanitize ->llseek()Al Viro1-9/+3
a) open files can't have NULL inodes b) it's SEEK_END, not ORANGEFS_SEEK_END; no need to get cute. c) make_bad_inode() on lseek()? Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-03-25orangefs: saner calling conventions for getting a slotAl Viro1-5/+5
just have it return the slot number or -E... - the caller checks the sign anyway Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-03-25orangefs_copy_{to,from}_bufmap(): don't pass bufmap pointerAl Viro1-12/+6
it's always __orangefs_bufmap Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-03-23orangefs: use new orangefs_inode_getattr to get size in write and llseekMartin Brandenburg1-6/+8
Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-03-23orangefs: rename orangefs_inode_getattr to orangefs_inode_old_getattrMartin Brandenburg1-3/+4
This is motivated by orangefs_inode_old_getattr's habit of writing over live inodes. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-03-09Orangefs: improve the POSIXness of interrupted writes...Mike Marshall1-9/+45
Don't return EINTR on interrupted writes if some data has already been written. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-03-03Orangefs: improve gossip statementsMike Marshall1-6/+2
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-02-24orangefs: remove vestigial async io codeMartin Brandenburg1-1/+0
I have verified that there is nothing in the userspace daemon version we are implementing this protocol against that ever looks at this field. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-02-19orangefs: get rid of op->doneAl Viro1-4/+2
shouldn't be needed now Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-02-19orangefs: delay freeing slot until cancel completesAl Viro1-12/+4
Make cancels reuse the aborted read/write op, to make sure they do not fail on lack of memory. Don't issue a cancel unless the daemon has seen our read/write, has not replied and isn't being shut down. If cancel *is* issued, don't wait for it to complete; stash the slot in there and just have it freed when cancel is finally replied to or purged (and delay dropping the reference until then, obviously). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-02-12get rid of bufmap argument of orangefs_bufmap_put()Al Viro1-3/+3
it's always equal to __orangefs_bufmap and the latter can't change until we are done Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-02-12orangefs: get rid of handle_io_error()Al Viro1-51/+14
the second caller never needs to cancel, actually Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-02-12orangefs: wait_for_direct_io(): restore the position in iter when restartingAl Viro1-0/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-02-12orangefs: avoid freeing a slot twice in wait_for_direct_io()Al Viro1-0/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-02-04Orangefs: added a couple of WARN_ONs, perhaps just temporarily.Mike Marshall1-0/+1
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-01-28orangefs: Fix revalidate.Martin Brandenburg1-2/+2
Previously, it would update a live inode. This was fixed, but it did not ever check that the inode attributes in the dcache are correct. This checks all inode attributes and rejects any that are not correct, which causes a lookup and thus a new getattr. Perhaps inode_operations->permission should replace or augment some of this. There is no actual caching, and this does a rather excessive amount of network operations back to the filesystem server. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-01-23orangefs: move handle_io_error() to file.cAl Viro1-6/+41
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-01-23orangefs: don't reinvent completion.h...Al Viro1-4/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2016-01-23orangefs: hopefully saner op refcounting and lockingAl Viro1-12/+5
* create with refcount 1 * make op_release() decrement and free if zero (i.e. old put_op() has become that). * mark when submitter has given up waiting; from that point nobody else can move between the lists, change state, etc. * have daemon read/write_iter grab a reference when picking op and *always* give it up in the end * don't put into hash until we know it's been successfully passed to daemon * move op->lock _lower_ than htab_in_progress_lock (and make sure to take it in purge_inprogress_ops()) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-12-04Orangefs: change pvfs2 filenames to orangefsMike Marshall1-3/+3
Also changed references within source files that referred to header files whose names had changed. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-12-03OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS.Yi Liu1-104/+104
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>
2015-11-16fs: out of bounds on stack in iov_iter_advanceAl Viro1-11/+8
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>
2015-11-13Orangefs: set pos after generic_write_checksMike Marshall1-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>
2015-11-13orangefs: make pvfs2_inode_read() take iov_iterAl Viro1-9/+3
... 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>
2015-11-13orangefs: make do_readv_writev() take iov_iterAl Viro1-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>
2015-11-13orangefs: don't bother with splitting iovecsAl Viro1-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>
2015-11-13orangefs: make wait_for_direct_io() take iov_iterAl Viro1-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>
2015-11-13orangefs: make precopy_buffers() take iov_iterAl Viro1-8/+5
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-11-13orangefs: make postcopy_buffers() take iov_iterAl Viro1-9/+5
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-11-13orangefs: explicitly pass the size to pvfs_bufmap_copy_to_iovec()Al Viro1-1/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-10-05Orangefs: fix some checkpatch.pl complaints that had creeped in.Mike Marshall1-13/+12
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-10-03Orangefs: Use readonly mmap since writepage is not implemented.Martin Brandenburg1-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>
2015-10-03Orangefs: choose return codes from among the expected ones.Mike Marshall1-1/+1
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-10-03Orangefs: use iov_iter interfaceMike Marshall1-46/+31
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>
2015-10-03Orangefs: address problems found by static checkerMike Marshall1-12/+6
Don't check for negative rc from boolean. Don't pointlessly initialize variables, it short-circuits gcc's uninitialized variable warnings. And max_new_nr_segs can never be zero, so don't check for it. Preserve original kstrdup pointer for freeing later. Don't check for negative value in unsigned variable. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-10-03Orangefs: sooth most sparse complaintsMike Marshall1-5/+8
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-10-03Orangefs: kernel client part 2Mike Marshall1-0/+1019
Signed-off-by: Mike Marshall <hubcap@omnibond.com>