Commit Graph

19 Commits

Author SHA1 Message Date
Al Viro
ed42fe0593 orangefs: hopefully saner op refcounting and locking
* 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>
2016-01-23 13:03:12 -05:00
Mike Marshall
575e946125 Orangefs: change pvfs2 filenames to orangefs
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-04 12:56:14 -05:00
Yi Liu
8bb8aefd5a OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS.
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-12-03 14:45:44 -05:00
Al Viro
555fa0fa61 fs: out of bounds on stack in iov_iter_advance
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-16 11:27:24 -05:00
Mike Marshall
3f1b6947dc Orangefs: set pos after generic_write_checks
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-13 13:05:11 -05:00
Al Viro
74f68fce2a orangefs: make pvfs2_inode_read() take iov_iter
... 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-13 11:36:31 -05:00
Al Viro
0071ed1ec6 orangefs: make do_readv_writev() take iov_iter
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-13 11:35:28 -05:00
Al Viro
dc4067f671 orangefs: don't bother with splitting iovecs
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-13 11:23:02 -05:00
Al Viro
3c2fcfcb68 orangefs: make wait_for_direct_io() take iov_iter
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-13 11:21:37 -05:00
Al Viro
a5c126a522 orangefs: make precopy_buffers() take iov_iter
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-11-13 11:18:50 -05:00
Al Viro
5f0e3c953f orangefs: make postcopy_buffers() take iov_iter
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-11-13 11:11:55 -05:00
Al Viro
5c278228bb orangefs: explicitly pass the size to pvfs_bufmap_copy_to_iovec()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-11-13 10:25:01 -05:00
Mike Marshall
548049495c Orangefs: fix some checkpatch.pl complaints that had creeped in.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-10-05 13:44:24 -04:00
Martin Brandenburg
353908035f Orangefs: Use readonly mmap since writepage is not implemented.
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-03 11:44:39 -04:00
Mike Marshall
f957ae2dec Orangefs: choose return codes from among the expected ones.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-10-03 11:44:34 -04:00
Mike Marshall
4d1c44043b Orangefs: use iov_iter interface
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-03 11:44:00 -04:00
Mike Marshall
eeaa3d448c Orangefs: address problems found by static checker
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-03 11:40:03 -04:00
Mike Marshall
84d02150de Orangefs: sooth most sparse complaints
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-10-03 11:40:02 -04:00
Mike Marshall
5db11c21a9 Orangefs: kernel client part 2
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2015-10-03 11:39:54 -04:00