aboutsummaryrefslogtreecommitdiffstats
path: root/fs/orangefs
Commit message (Collapse)AuthorAge
...
* orangefs: clean up op_alloc()Al Viro2016-01-23
| | | | | | | | | fold orangefs_op_initialize() in there, don't bother locking something nobody else could've seen yet, use kmem_cache_zalloc() instead of explicit memset()... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: move handle_io_error() to file.cAl Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: don't reinvent completion.h...Al Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* if ORANGEFS_VFS_OP_FILE_IO request had been given up, don't bother waitingAl Viro2016-01-23
| | | | | | | | ... we are not going to get woken up anyway, so it's just going to time out and whine. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: get rid of MSECS_TO_JIFFIESAl Viro2016-01-23
| | | | | | | | | All timeouts are in _seconds_, so all calls are of form MSECS_TO_JIFFIES(n * 1000), which is a convoluted way to spell n * HZ. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs_clean_up_interrupted_operation: call with op->lock heldAl Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: reduce nesting in wait_for_matching_downcall()Al Viro2016-01-23
| | | | | | | reorder if branches... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: remove cargo-culting spin_lock_irqsave() in service_operation()Al Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: hopefully saner op refcounting and lockingAl Viro2016-01-23
| | | | | | | | | | | | | | | | | | * 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>
* orangefs: make sure that reopening pvfs2-req won't overlap with the end of closeAl Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: nothing should remain in request list and in hashAl Viro2016-01-23
| | | | | | | | ... otherwise some thread is running in .text that is about to be freed. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: move wakeups into set_op_state_{serviced,purged}()Al Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: make wait_for_...downcall() staticAl Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: move wakeups into set_op_state_{serviced,purged}()Al Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: make wait_for_...downcall() staticAl Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* make orangefs_clean_up_interrupted_operation() staticAl Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: kill orangefs_inode_s ->listAl Viro2016-01-23
| | | | | | | no users... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: get rid of <censored> macrosAl Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: ->poll() doesn't need spinlockAl Viro2016-01-23
| | | | | | | not just for list_empty()... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: kill ioctl32 rudimentsAl Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: ->poll() is only called between successful ->open() and ->release()Al Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: generic_file_open() is pointless for character devicesAl Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: use DEFINE_MUTEX (and mutex_init() had been too late)Al Viro2016-01-23
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: make gossip statement more palatable to xtensaMike Marshall2016-01-19
| | | | | | Thanks to Intel's kbuild test robot Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: add verification to decode_direntsMike Marshall2016-01-15
| | | | | | Also add comments to decode_dirents and make it more readable. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: make .statfs gossip_debug more complete.Mike Marshall2016-01-13
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: define a minimum compatible userspace version.Mike Marshall2016-01-13
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: change ORANGEFS_VERSION from "Unknown" to "upstream"Mike Marshall2016-01-13
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: rename orangefs_kernel_op_s.aio_ref_count to just ref_count.Mike Marshall2016-01-13
| | | | | | | The op structure's ref_count member hasn't got anything to do with asynchronous I/O. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: implement .write_iterMike Marshall2016-01-13
| | | | | | | | | | | | | | Until now, orangefs_devreq_write_iter has just been a wrapper for the old-fashioned orangefs_devreq_writev... linux would call .write_iter with "struct kiocb *iocb" and "struct iov_iter *iter" and .write_iter would just: return pvfs2_devreq_writev(iocb->ki_filp, iter->iov, iter->nr_segs, &iocb->ki_pos); Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: Fix some more global namespace pollution.Martin Brandenburg2016-01-04
| | | | | | | This only changes the names of things, so there is no functional change. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: Don't pollute global namespaceRichard Weinberger2016-01-04
| | | | | | | | | | | Prefix public functions with "orangefs_" do don't pollute the global namespace. This fixes a build issue on UML which also has block_signals(). Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* OrangeFS: constify export_operations structuresJulia Lawall2016-01-04
| | | | | | | | | | This export_operations structure is never modified, so declare it as const. Most other structures of this type are already const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: don't trigger copy_attributes_to_inode from d_revalidate.Mike Marshall2015-12-30
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: fix typo in ornagefs_inode_lockArnd Bergmann2015-12-28
| | | | | | | | | Orangefs fails to build on 32-bit SMP configurations due to a simple misspelling, this does the obvious fix. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 575e946125f7 ("Orangefs: change pvfs2 filenames to orangefs") Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: use kzalloc for kmalloc + memset 0Nicholas Mc Guire2015-12-28
| | | | | | | | This is an API consolidation only. The use of kmalloc + memset to 0 should be equivalent to kzalloc in this case. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: validate resp.listxattr.returned_countMike Marshall2015-12-17
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: don't use deprecated xattr defines.Mike Marshall2015-12-17
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: Do not unref if there is no bufmap.Martin Brandenburg2015-12-17
| | | | | 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-17
| | | | | | | | | | | 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-17
| | | | | 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-17
| | | | | | | | | | 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-15
| | | | | | | 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-14
| | | | | | | 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-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-11
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: improve commentsMike Marshall2015-12-11
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: don't keep checking stuff in on Friday afternoon.Mike Marshall2015-12-11
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: don't expose internal details of pathname resolution to userspace.Mike Marshall2015-12-04
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: change pvfs2 filenames to orangefsMike Marshall2015-12-04
| | | | | | | Also changed references within source files that referred to header files whose names had changed. Signed-off-by: Mike Marshall <hubcap@omnibond.com>