diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 15:39:53 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 15:39:53 -0400 |
| commit | f6f0a6d6a7258eff41fd202fc70df18271a2de79 (patch) | |
| tree | a32040d8cc6e06e056e184e35ed4729e28a244d8 | |
| parent | 2017bd19454ea7cdae19922d15b6930f6c8088a2 (diff) | |
| parent | 33027af637da3f69bd17488cc3e68493c9052a7d (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (22 commits)
GFS2: fixed typo
GFS2: Fix type mapping for demote_rq interface
GFS2 fatal: filesystem consistency error on rename
GFS2: Improve journal allocation via sysfs
GFS2: Add "norecovery" mount option as a synonym for "spectator"
GFS2: Fix spectator umount issue
GFS2: Fix compiler warning from previous patch
GFS2: reserve more blocks for transactions
GFS2: Fix journal check for spectator mounts
GFS2: Remove upgrade mount option
GFS2: Remove localcaching mount option
GFS2: Remove ignore_local_fs mount argument
GFS2: Make . and .. qstrs constant
GFS2: Use new workqueue scheme
GFS2: Update handling of DLM return codes to match reality
GFS2: Don't enforce min hold time when two demotes occur in rapid succession
GFS2: Fix whitespace in previous patch
GFS2: fallocate support
GFS2: Add a bug trap in allocation code
GFS2: No longer experimental
...
| -rw-r--r-- | fs/gfs2/Kconfig | 2 | ||||
| -rw-r--r-- | fs/gfs2/aops.c | 24 | ||||
| -rw-r--r-- | fs/gfs2/bmap.c | 255 | ||||
| -rw-r--r-- | fs/gfs2/bmap.h | 20 | ||||
| -rw-r--r-- | fs/gfs2/dentry.c | 2 | ||||
| -rw-r--r-- | fs/gfs2/dir.c | 31 | ||||
| -rw-r--r-- | fs/gfs2/dir.h | 34 | ||||
| -rw-r--r-- | fs/gfs2/export.c | 9 | ||||
| -rw-r--r-- | fs/gfs2/file.c | 6 | ||||
| -rw-r--r-- | fs/gfs2/glock.c | 23 | ||||
| -rw-r--r-- | fs/gfs2/glock.h | 2 | ||||
| -rw-r--r-- | fs/gfs2/glops.c | 6 | ||||
| -rw-r--r-- | fs/gfs2/incore.h | 8 | ||||
| -rw-r--r-- | fs/gfs2/inode.c | 9 | ||||
| -rw-r--r-- | fs/gfs2/inode.h | 15 | ||||
| -rw-r--r-- | fs/gfs2/lock_dlm.c | 4 | ||||
| -rw-r--r-- | fs/gfs2/main.c | 6 | ||||
| -rw-r--r-- | fs/gfs2/ops_fstype.c | 79 | ||||
| -rw-r--r-- | fs/gfs2/ops_inode.c | 326 | ||||
| -rw-r--r-- | fs/gfs2/quota.c | 16 | ||||
| -rw-r--r-- | fs/gfs2/recovery.c | 15 | ||||
| -rw-r--r-- | fs/gfs2/rgrp.c | 50 | ||||
| -rw-r--r-- | fs/gfs2/rgrp.h | 8 | ||||
| -rw-r--r-- | fs/gfs2/super.c | 26 | ||||
| -rw-r--r-- | fs/gfs2/sys.c | 22 | ||||
| -rw-r--r-- | fs/gfs2/trace_gfs2.h | 3 | ||||
| -rw-r--r-- | fs/gfs2/trans.h | 9 | ||||
| -rw-r--r-- | fs/gfs2/xattr.c | 2 |
28 files changed, 617 insertions, 395 deletions
diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig index cc9665522148..c465ae066c62 100644 --- a/fs/gfs2/Kconfig +++ b/fs/gfs2/Kconfig | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | config GFS2_FS | 1 | config GFS2_FS |
| 2 | tristate "GFS2 file system support" | 2 | tristate "GFS2 file system support" |
| 3 | depends on EXPERIMENTAL && (64BIT || LBDAF) | 3 | depends on (64BIT || LBDAF) |
| 4 | select DLM if GFS2_FS_LOCKING_DLM | 4 | select DLM if GFS2_FS_LOCKING_DLM |
| 5 | select CONFIGFS_FS if GFS2_FS_LOCKING_DLM | 5 | select CONFIGFS_FS if GFS2_FS_LOCKING_DLM |
| 6 | select SYSFS if GFS2_FS_LOCKING_DLM | 6 | select SYSFS if GFS2_FS_LOCKING_DLM |
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 194fe16d8418..6b24afb96aae 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c | |||
| @@ -36,8 +36,8 @@ | |||
| 36 | #include "glops.h" | 36 | #include "glops.h" |
| 37 | 37 | ||
| 38 | 38 | ||
| 39 | static void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page, | 39 | void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page, |
| 40 | unsigned int from, unsigned int to) | 40 | unsigned int from, unsigned int to) |
| 41 | { | 41 | { |
| 42 | struct buffer_head *head = page_buffers(page); | 42 | struct buffer_head *head = page_buffers(page); |
| 43 | unsigned int bsize = head->b_size; | 43 | unsigned int bsize = head->b_size; |
| @@ -615,7 +615,7 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping, | |||
| 615 | unsigned int data_blocks = 0, ind_blocks = 0, rblocks; | 615 | unsigned int data_blocks = 0, ind_blocks = 0, rblocks; |
| 616 | int alloc_required; | 616 | int alloc_required; |
| 617 | int error = 0; | 617 | int error = 0; |
| 618 | struct gfs2_alloc *al; | 618 | struct gfs2_alloc *al = NULL; |
| 619 | pgoff_t index = pos >> PAGE_CACHE_SHIFT; | 619 | pgoff_t index = pos >> PAGE_CACHE_SHIFT; |
| 620 | unsigned from = pos & (PAGE_CACHE_SIZE - 1); | 620 | unsigned from = pos & (PAGE_CACHE_SIZE - 1); |
| 621 | unsigned to = from + len; | 621 | unsigned to = from + len; |
| @@ -663,6 +663,8 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping, | |||
| 663 | rblocks += RES_STATFS + RES_QUOTA; | 663 | rblocks += RES_STATFS + RES_QUOTA; |
| 664 | if (&ip->i_inode == sdp->sd_rindex) | 664 | if (&ip->i_inode == sdp->sd_rindex) |
| 665 | rblocks += 2 * RES_STATFS; | 665 | rblocks += 2 * RES_STATFS; |
| 666 | if (alloc_required) | ||
| 667 | rblocks += gfs2_rg_blocks(al); | ||
| 666 | 668 | ||
| 667 | error = gfs2_trans_begin(sdp, rblocks, | 669 | error = gfs2_trans_begin(sdp, rblocks, |
| 668 | PAGE_CACHE_SIZE/sdp->sd_sb.sb_bsize); | 670 | PAGE_CACHE_SIZE/sdp->sd_sb.sb_bsize); |
| @@ -696,13 +698,11 @@ out: | |||
| 696 | 698 | ||
| 697 | page_cache_release(page); | 699 | page_cache_release(page); |
| 698 | 700 | ||
| 699 | /* | 701 | gfs2_trans_end(sdp); |
| 700 | * XXX(truncate): the call below should probably be replaced with | ||
| 701 | * a call to the gfs2-specific truncate blocks helper to actually | ||
| 702 | * release disk blocks.. | ||
| 703 | */ | ||
| 704 | if (pos + len > ip->i_inode.i_size) | 702 | if (pos + len > ip->i_inode.i_size) |
| 705 | truncate_setsize(&ip->i_inode, ip->i_inode.i_size); | 703 | gfs2_trim_blocks(&ip->i_inode); |
| 704 | goto out_trans_fail; | ||
| 705 | |||
| 706 | out_endtrans: | 706 | out_endtrans: |
| 707 | gfs2_trans_end(sdp); | 707 | gfs2_trans_end(sdp); |
| 708 | out_trans_fail: | 708 | out_trans_fail: |
| @@ -802,10 +802,8 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh, | |||
| 802 | page_cache_release(page); | 802 | page_cache_release(page); |
| 803 | 803 | ||
| 804 | if (copied) { | 804 | if (copied) { |
| 805 | if (inode->i_size < to) { | 805 | if (inode->i_size < to) |
| 806 | i_size_write(inode, to); | 806 | i_size_write(inode, to); |
| 807 | ip->i_disksize = inode->i_size; | ||
| 808 | } | ||
| 809 | gfs2_dinode_out(ip, di); | 807 | gfs2_dinode_out(ip, di); |
| 810 | mark_inode_dirty(inode); | 808 | mark_inode_dirty(inode); |
| 811 | } | 809 | } |
| @@ -876,8 +874,6 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping, | |||
| 876 | 874 | ||
| 877 | ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata); | 875 | ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata); |
| 878 | if (ret > 0) { | 876 | if (ret > 0) { |
| 879 | if (inode->i_size > ip->i_disksize) | ||
| 880 | ip->i_disksize = inode->i_size; | ||
| 881 | gfs2_dinode_out(ip, dibh->b_data); | 877 | gfs2_dinode_out(ip, dibh->b_data); |
| 882 | mark_inode_dirty(inode); | 878 | mark_inode_dirty(inode); |
| 883 | } | 879 | } |
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 6f482809d1a3..5476c066d4ee 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
| @@ -50,7 +50,7 @@ struct strip_mine { | |||
| 50 | * @ip: the inode | 50 | * @ip: the inode |
| 51 | * @dibh: the dinode buffer | 51 | * @dibh: the dinode buffer |
| 52 | * @block: the block number that was allocated | 52 | * @block: the block number that was allocated |
| 53 | * @private: any locked page held by the caller process | 53 | * @page: The (optional) page. This is looked up if @page is NULL |
| 54 | * | 54 | * |
| 55 | * Returns: errno | 55 | * Returns: errno |
| 56 | */ | 56 | */ |
| @@ -109,8 +109,7 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
| 109 | /** | 109 | /** |
| 110 | * gfs2_unstuff_dinode - Unstuff a dinode when the data has grown too big | 110 | * gfs2_unstuff_dinode - Unstuff a dinode when the data has grown too big |
| 111 | * @ip: The GFS2 inode to unstuff | 111 | * @ip: The GFS2 inode to unstuff |
| 112 | * @unstuffer: the routine that handles unstuffing a non-zero length file | 112 | * @page: The (optional) page. This is looked up if the @page is NULL |
| 113 | * @private: private data for the unstuffer | ||
| 114 | * | 113 | * |
| 115 | * This routine unstuffs a dinode and returns it to a "normal" state such | 114 | * This routine unstuffs a dinode and returns it to a "normal" state such |
| 116 | * that the height can be grown in the traditional way. | 115 | * that the height can be grown in the traditional way. |
| @@ -132,7 +131,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page) | |||
| 132 | if (error) | 131 | if (error) |
| 133 | goto out; | 132 | goto out; |
| 134 | 133 | ||
| 135 | if (ip->i_disksize) { | 134 | if (i_size_read(&ip->i_inode)) { |
| 136 | /* Get a free block, fill it with the stuffed data, | 135 | /* Get a free block, fill it with the stuffed data, |
| 137 | and write it out to disk */ | 136 | and write it out to disk */ |
| 138 | 137 | ||
| @@ -161,7 +160,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page) | |||
| 161 | di = (struct gfs2_dinode *)dibh->b_data; | 160 | di = (struct gfs2_dinode *)dibh->b_data; |
| 162 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); | 161 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); |
| 163 | 162 | ||
| 164 | if (ip->i_disksize) { | 163 | if (i_size_read(&ip->i_inode)) { |
| 165 | *(__be64 *)(di + 1) = cpu_to_be64(block); | 164 | *(__be64 *)(di + 1) = cpu_to_be64(block); |
| 166 | gfs2_add_inode_blocks(&ip->i_inode, 1); | 165 | gfs2_add_inode_blocks(&ip->i_inode, 1); |
| 167 | di->di_blocks = cpu_to_be64(gfs2_get_inode_blocks(&ip->i_inode)); | 166 | di->di_blocks = cpu_to_be64(gfs2_get_inode_blocks(&ip->i_inode)); |
| @@ -885,83 +884,14 @@ out: | |||
| 885 | } | 884 | } |
| 886 | 885 | ||
| 887 | /** | 886 | /** |
| 888 | * do_grow - Make a file look bigger than it is | ||
| 889 | * @ip: the inode | ||
| 890 | * @size: the size to set the file to | ||
| 891 | * | ||
| 892 | * Called with an exclusive lock on @ip. | ||
