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

Commit 84d02150 authored by Mike Marshall's avatar Mike Marshall
Browse files

Orangefs: sooth most sparse complaints

parent 2c590d5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -857,7 +857,7 @@ static unsigned long translate_dev_map26(unsigned long args, long *error)
	 */
	struct PVFS_dev_map_desc __user *p =
	    compat_alloc_user_space(sizeof(*p));
	u32 addr;
	compat_uptr_t addr;

	*error = 0;
	/* get the ptr from the 32 bit user-space */
+8 −5
Original line number Diff line number Diff line
@@ -799,7 +799,7 @@ static ssize_t pvfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *iter)
/*
 * Perform a miscellaneous operation on a file.
 */
long pvfs2_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
static long pvfs2_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
	int ret = -ENOTTY;
	__u64 val = 0;
@@ -885,7 +885,7 @@ static int pvfs2_file_mmap(struct file *file, struct vm_area_struct *vma)
 *
 * \note Not called when each file is closed.
 */
int pvfs2_file_release(struct inode *inode, struct file *file)
static int pvfs2_file_release(struct inode *inode, struct file *file)
{
	gossip_debug(GOSSIP_FILE_DEBUG,
		     "pvfs2_file_release: called on %s\n",
@@ -909,7 +909,10 @@ int pvfs2_file_release(struct inode *inode, struct file *file)
/*
 * Push all data for a specific file onto permanent storage.
 */
int pvfs2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
static int pvfs2_fsync(struct file *file,
		       loff_t start,
		       loff_t end,
		       int datasync)
{
	int ret = -EINVAL;
	struct pvfs2_inode_s *pvfs2_inode =
@@ -947,7 +950,7 @@ int pvfs2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
 * Future upgrade could support SEEK_DATA and SEEK_HOLE but would
 * require much changes to the FS
 */
loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin)
static loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin)
{
	int ret = -EINVAL;
	struct inode *inode = file->f_path.dentry->d_inode;
@@ -989,7 +992,7 @@ loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin)
 * Support local locks (locks that only this kernel knows about)
 * if Orangefs was mounted -o local_lock.
 */
int pvfs2_lock(struct file *filp, int cmd, struct file_lock *fl)
static int pvfs2_lock(struct file *filp, int cmd, struct file_lock *fl)
{
	int rc = -ENOLCK;

+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ static int read_one_page(struct page *page)
		loff_t blockptr_offset = (((loff_t) page->index) << blockbits);

		bytes_read = pvfs2_inode_read(inode,
					      page_data,
					      (char __user *) page_data,
					      blocksize,
					      &blockptr_offset,
					      inode->i_size);
+1 −11
Original line number Diff line number Diff line
@@ -341,7 +341,7 @@ __s32 PINT_non_errno_mapping[] = { \
extern __s32 PINT_errno_mapping[];					\
extern __s32 PINT_non_errno_mapping[];				\
extern const char *PINT_non_errno_strerror_mapping[];			\
__s32 PVFS_get_errno_mapping(__s32 error)			\
static __s32 PVFS_get_errno_mapping(__s32 error)			\
{									\
	__s32 ret = error, mask = 0;				\
	__s32 positive = ((error > -1) ? 1 : 0);			\
@@ -364,16 +364,6 @@ __s32 PVFS_get_errno_mapping(__s32 error) \
	}								\
	return ret;							\
}									\
__s32 PVFS_errno_to_error(int err)					\
{									\
	__s32 e = 0;						\
									\
	for (; e < PVFS_ERRNO_MAX; ++e)					\
		if (PINT_errno_mapping[e] == err)			\
			return e | PVFS_ERROR_BIT;			\
									\
	return err;							\
}									\
DECLARE_ERRNO_MAPPING()

/* permission bits */
+7 −3
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@

DECLARE_WAIT_QUEUE_HEAD(pvfs2_bufmap_init_waitq);

struct pvfs2_bufmap {
static struct pvfs2_bufmap {
	atomic_t refcnt;

	int desc_size;
@@ -663,6 +663,7 @@ int pvfs_bufmap_copy_iovec_from_kernel(struct pvfs2_bufmap *bufmap,
	int to_page_index = 0;
	void *to_kaddr = NULL;
	void *from_kaddr = NULL;
	struct kvec *iv = NULL;
	struct iovec *copied_iovec = NULL;
	struct pvfs_bufmap_desc *to;
	unsigned int seg;
@@ -708,9 +709,10 @@ int pvfs_bufmap_copy_iovec_from_kernel(struct pvfs2_bufmap *bufmap,
	 * buffer into the mapped buffer one page at a time though
	 */
	while (amt_copied < size) {
		struct iovec *iv = &copied_iovec[seg];
		int inc_to_page_index;

		iv = (struct kvec *) &copied_iovec[seg];

		if (iv->iov_len < (PAGE_SIZE - to_page_offset)) {
			cur_copy_size =
			    PVFS_util_min(iv->iov_len, size - amt_copied);
@@ -885,6 +887,7 @@ int pvfs_bufmap_copy_to_kernel_iovec(struct pvfs2_bufmap *bufmap,
	int from_page_index = 0;
	void *from_kaddr = NULL;
	void *to_kaddr = NULL;
	struct kvec *iv;
	struct iovec *copied_iovec = NULL;
	struct pvfs_bufmap_desc *from;
	unsigned int seg;
@@ -930,9 +933,10 @@ int pvfs_bufmap_copy_to_kernel_iovec(struct pvfs2_bufmap *bufmap,
	 * but make sure that we do so one page at a time.
	 */
	while (amt_copied < size) {
		struct iovec *iv = &copied_iovec[seg];
		int inc_from_page_index;

		iv = (struct kvec *) &copied_iovec[seg];

		if (iv->iov_len < (PAGE_SIZE - from_page_offset)) {
			cur_copy_size =
			    PVFS_util_min(iv->iov_len, size - amt_copied);
Loading