All of lore.kernel.org
 help / color / mirror / Atom feed
From: fabbione@sourceware.org <fabbione@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs-kernel/src/gfs ops_file.c
Date: 30 Jan 2008 09:05:57 -0000	[thread overview]
Message-ID: <20080130090557.19890.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	fabbione at sourceware.org	2008-01-30 09:05:57

Modified files:
	gfs-kernel/src/gfs: ops_file.c 

Log message:
	Whitespace cleanup

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.c.diff?cvsroot=cluster&r1=1.39&r2=1.40

--- cluster/gfs-kernel/src/gfs/ops_file.c	2008/01/30 06:37:53	1.39
+++ cluster/gfs-kernel/src/gfs/ops_file.c	2008/01/30 09:05:57	1.40
@@ -439,16 +439,16 @@
 
 /*
  * gfs_aio_read: match with vfs generic_file_aio_read as:
- *      (struct kiocb *iocb, char __user *buf, size_t count, loff_t pos)
+ *	(struct kiocb *iocb, char __user *buf, size_t count, loff_t pos)
  */
 static ssize_t
 gfs_aio_read(struct kiocb *iocb, const struct iovec *iov, unsigned long count,
-                         loff_t pos)
+		loff_t pos)
 {
-        struct file *filp = iocb->ki_filp;
+	struct file *filp = iocb->ki_filp;
 
-        BUG_ON(iocb->ki_pos != pos);
-        return(__gfs_read(filp, iov->iov_base, iov->iov_len, &iocb->ki_pos, iocb));
+	BUG_ON(iocb->ki_pos != pos);
+	return(__gfs_read(filp, iov->iov_base, iov->iov_len, &iocb->ki_pos, iocb));
 }
 
 /**
@@ -534,12 +534,12 @@
 			struct kiocb *iocb)
 {
 	struct inode *inode = file->f_mapping->host;
-        struct gfs_inode *ip = get_v2ip(inode);
-        struct gfs_sbd *sdp = ip->i_sbd;
-        struct gfs_alloc *al = NULL;
-        struct buffer_head *dibh;
-        unsigned int data_blocks, ind_blocks;
-        ssize_t count;
+	struct gfs_inode *ip = get_v2ip(inode);
+	struct gfs_sbd *sdp = ip->i_sbd;
+	struct gfs_alloc *al = NULL;
+	struct buffer_head *dibh;
+	unsigned int data_blocks, ind_blocks;
+	ssize_t count;
 	int error;
 
 	gfs_write_calc_reserv(ip, size, &data_blocks, &ind_blocks);
@@ -584,13 +584,13 @@
 	}
 
 	if (gfs_is_stuffed(ip)) { error = gfs_unstuff_dinode(ip, gfs_unstuffer_sync, NULL); if (error)
-                        goto fail_end_trans;
-        }
+			goto fail_end_trans;
+	}
 
-        count = gfs_file_aio_write_nolock(file, buf, size, offset, iocb);
-        if (count < 0) {
-                error = count;
-                goto fail_end_trans;
+	count = gfs_file_aio_write_nolock(file, buf, size, offset, iocb);
+	if (count < 0) {
+		error = count;
+		goto fail_end_trans;
 	}
 
 	error = gfs_get_inode_buffer(ip, &dibh);
@@ -748,23 +748,23 @@
 
 			buf += error;
 			size -= error;
-                        count += error;
-                }
-        } else {
-                struct gfs_holder t_gh;
+			count += error;
+		}
+	} else {
+		struct gfs_holder t_gh;
 
-                clear_bit(GFF_DID_DIRECT_ALLOC, &fp->f_flags);
+		clear_bit(GFF_DID_DIRECT_ALLOC, &fp->f_flags);
 
 		error = gfs_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED, 0, &t_gh);
 		if (error)
 			goto out_gunlock;
 
-                /* Todo: It would be nice if init_sync_kiocb is exported.
-                 *  .. wcheng
-                 */
-                count = gfs_file_aio_write_nolock(file, buf, size, offset, iocb);
-                gfs_glock_dq_uninit(&t_gh);
-        }
+		/* Todo: It would be nice if init_sync_kiocb is exported.
+		 *  .. wcheng
+		 */
+		count = gfs_file_aio_write_nolock(file, buf, size, offset, iocb);
+		gfs_glock_dq_uninit(&t_gh);
+	}
 
 out_iocb_write:
 	error = 0;
@@ -882,13 +882,13 @@
 				ClearPageUptodate(page);
 				page_cache_release(page);
 			}
-                }
-                *offset += count;
-        } else {
-                count = gfs_file_aio_write_nolock(file, buf, size, offset, iocb);
-                if (count < 0) {
-                        error = count;
-                        goto fail_end_trans;
+		}
+		*offset += count;
+	} else {
+		count = gfs_file_aio_write_nolock(file, buf, size, offset, iocb);
+		if (count < 0) {
+			error = count;
+			goto fail_end_trans;
 		}
 
 		error = gfs_get_inode_buffer(ip, &dibh);
@@ -1062,14 +1062,14 @@
 
 static ssize_t
 gfs_aio_write(struct kiocb *iocb, const struct iovec *iov, unsigned long segs,
-                          loff_t pos)
+			loff_t pos)
 {
-        struct file *file = iocb->ki_filp;
+	struct file *file = iocb->ki_filp;
 
-        BUG_ON(iocb->ki_pos != pos);
+	BUG_ON(iocb->ki_pos != pos);
 
-        return(__gfs_write(file, iov->iov_base, iov->iov_len, &iocb->ki_pos, 
-                                           iocb));
+	return(__gfs_write(file, iov->iov_base, iov->iov_len, &iocb->ki_pos,
+					iocb));
 }
 
 /**
@@ -1388,7 +1388,7 @@
 static long
 gfs_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg)
 {
-        struct gfs_inode *ip = get_v2ip(file->f_mapping->host);
+	struct gfs_inode *ip = get_v2ip(file->f_mapping->host);
 
 	atomic_inc(&ip->i_sbd->sd_ops_file);
 
@@ -1400,11 +1400,11 @@
 		return 0;
         }
 
-        case GFS_IOCTL_SUPER:
-                return gfs_ioctl_i_compat(ip, arg);
+	case GFS_IOCTL_SUPER:
+		return gfs_ioctl_i_compat(ip, arg);
 
-        default:
-                return -ENOTTY;
+	default:
+		return -ENOTTY;
 	}
 }
 #endif
@@ -1613,15 +1613,15 @@
 
 	if (!(fl->fl_flags & FL_POSIX))
 		return -ENOLCK;
-        if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
-                return -ENOLCK;
+	if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
+		return -ENOLCK;
 
-        if (IS_GETLK(cmd))
-                return gfs_lm_plock_get(sdp, &name, file, fl);
-        else if (fl->fl_type == F_UNLCK)
+	if (IS_GETLK(cmd))
+		return gfs_lm_plock_get(sdp, &name, file, fl);
+	else if (fl->fl_type == F_UNLCK)
 		return gfs_lm_punlock(sdp, &name, file, fl);
 	else
-                return gfs_lm_plock(sdp, &name, file, cmd, fl);
+		return gfs_lm_plock(sdp, &name, file, cmd, fl);
 }
 
 /**
@@ -1661,7 +1661,7 @@
  out:
 	gfs_holder_uninit(&gh);
 
-        return retval;
+	return retval;
 }
 
 /**
@@ -1756,18 +1756,18 @@
 static int
 gfs_flock(struct file *file, int cmd, struct file_lock *fl)
 {
-        struct gfs_inode *ip = get_v2ip(file->f_mapping->host);
+	struct gfs_inode *ip = get_v2ip(file->f_mapping->host);
 
-        atomic_inc(&ip->i_sbd->sd_ops_file);
+	atomic_inc(&ip->i_sbd->sd_ops_file);
 
 	if (!(fl->fl_flags & FL_FLOCK))
 		return -ENOLCK;
-        if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
-                return -ENOLCK;
+	if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
+		return -ENOLCK;
 
-        if (fl->fl_type == F_UNLCK) {
-                do_unflock(file, fl);
-                return 0;
+	if (fl->fl_type == F_UNLCK) {
+		do_unflock(file, fl);
+		return 0;
 	} else
 		return do_flock(file, cmd, fl);
 }
@@ -1776,32 +1776,32 @@
 	.llseek = gfs_llseek,
 	.read = gfs_read,
 	.write = gfs_write,
-        .aio_read = gfs_aio_read,
-        .aio_write = gfs_aio_write,
+	.aio_read = gfs_aio_read,
+	.aio_write = gfs_aio_write,
 	.ioctl = gfs_ioctl,
 #ifdef CONFIG_COMPAT
-        .compat_ioctl   = gfs_compat_ioctl,
+	.compat_ioctl   = gfs_compat_ioctl,
 #endif
 	.mmap = gfs_mmap,
 	.open = gfs_open,
-        .release = gfs_close,
-        .fsync = gfs_fsync,
-        .lock = gfs_lock,
-        .splice_read = gfs_splice_read,
-        .flock = gfs_flock,
+	.release = gfs_close,
+	.fsync = gfs_fsync,
+	.lock = gfs_lock,
+	.splice_read = gfs_splice_read,
+	.flock = gfs_flock,
 };
 
 struct file_operations gfs_dir_fops = {
 	.readdir = gfs_readdir,
 	.ioctl = gfs_ioctl,
 #ifdef CONFIG_COMPAT
-        .compat_ioctl   = gfs_compat_ioctl,
+	.compat_ioctl   = gfs_compat_ioctl,
 #endif
 	.open = gfs_open,
 	.release = gfs_close,
 	.fsync = gfs_fsync,
-        .lock = gfs_lock,
-        .flock = gfs_flock,
+	.lock = gfs_lock,
+	.flock = gfs_flock,
 };
 
 struct file_operations gfs_file_fops_nolock = {



             reply	other threads:[~2008-01-30  9:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30  9:05 fabbione [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-01-28  6:36 [Cluster-devel] cluster/gfs-kernel/src/gfs ops_file.c fabbione
2007-06-17  3:35 wcheng
2007-06-17  2:56 wcheng
2007-05-24 22:34 wcheng
2007-05-04 14:49 wcheng
2007-01-17 22:30 wcheng
2006-11-17 20:39 wcheng
2006-11-17 20:33 wcheng
2006-11-17 20:26 wcheng
2006-11-17 19:49 wcheng
2006-11-17 16:15 wcheng
2006-11-17  5:00 wcheng
2006-10-27 16:22 wcheng
2006-10-24  3:35 wcheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080130090557.19890.qmail@sourceware.org \
    --to=fabbione@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.