Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb419553 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull orangefs updates from Mike Marshall:
 "Orangefs: cleanups, a protocol fix and an added configuration button.

  Cleanups:

   - silence harmless integer overflow warning (from
     dan.carpenter@oracle.com)

   - Dan Carpenter influenced debugfs cleanups.

   - remove orangefs_backing_dev_info (from jack@suse.cz)

  Protocol fix:

   - fix buffer size mis-match between kernel space and user space

  New configuration button:

   - support readahead_readcnt parameter"

* tag 'for-linus-4.11-ofs2' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
  orangefs: fix buffer size mis-match between kernel space and user space.
  orangefs: Dan Carpenter influenced cleanups...
  orangefs: Remove orangefs_backing_dev_info
  orangefs: Support readahead_readcnt parameter.
  orangefs: silence harmless integer overflow warning
parents 9003ed1f e98bdb30
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -400,8 +400,9 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
	/* remove the op from the in progress hash table */
	op = orangefs_devreq_remove_op(head.tag);
	if (!op) {
		gossip_err("WARNING: No one's waiting for tag %llu\n",
			   llu(head.tag));
		gossip_debug(GOSSIP_DEV_DEBUG,
			     "%s: No one's waiting for tag %llu\n",
			     __func__, llu(head.tag));
		return ret;
	}

+0 −6
Original line number Diff line number Diff line
@@ -136,12 +136,6 @@ static ssize_t orangefs_direct_IO(struct kiocb *iocb,
	return -EINVAL;
}

struct backing_dev_info orangefs_backing_dev_info = {
	.name = "orangefs",
	.ra_pages = 0,
	.capabilities = BDI_CAP_NO_ACCT_DIRTY | BDI_CAP_NO_WRITEBACK,
};

/** ORANGEFS2 implementation of address space operations */
const struct address_space_operations orangefs_address_operations = {
	.readpage = orangefs_readpage,
+5 −0
Original line number Diff line number Diff line
@@ -344,6 +344,11 @@ int orangefs_bufmap_initialize(struct ORANGEFS_dev_map_desc *user_desc)
		     user_desc->size,
		     user_desc->count);

	if (user_desc->total_size < 0 ||
	    user_desc->size < 0 ||
	    user_desc->count < 0)
		goto out;

	/*
	 * sanity check alignment and size of buffer that caller wants to
	 * work with
+8 −7
Original line number Diff line number Diff line
@@ -973,7 +973,7 @@ int orangefs_debugfs_new_client_string(void __user *arg)
	if (ret != 0) {
		pr_info("%s: CLIENT_STRING: copy_from_user failed\n",
			__func__);
		return -EIO;
		return -EFAULT;
	}

	/*
@@ -995,10 +995,11 @@ int orangefs_debugfs_new_client_string(void __user *arg)
	if (!help_string_initialized) {

		/* Build a proper debug help string. */
		if (orangefs_prepare_debugfs_help_string(0)) {
		ret = orangefs_prepare_debugfs_help_string(0);
		if (ret) {
			gossip_err("%s: no debug help string \n",
				   __func__);
			return -EIO;
			return ret;
		}

	}
@@ -1011,7 +1012,7 @@ int orangefs_debugfs_new_client_string(void __user *arg)

	help_string_initialized++;

	return ret;
	return 0;
}

int orangefs_debugfs_new_debug(void __user *arg) 
+1 −2
Original line number Diff line number Diff line
@@ -50,8 +50,7 @@
 * Misc constants. Please retain them as multiples of 8!
 * Otherwise 32-64 bit interactions will be messed up :)
 */
#define ORANGEFS_MAX_DEBUG_STRING_LEN	0x00000400
#define ORANGEFS_MAX_DEBUG_ARRAY_LEN	0x00000800
#define ORANGEFS_MAX_DEBUG_STRING_LEN	0x00000800

/*
 * The maximum number of directory entries in a single request is 96.
Loading