]> Git Repo - linux.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
authorLinus Torvalds <[email protected]>
Fri, 21 May 2010 14:29:15 +0000 (07:29 -0700)
committerLinus Torvalds <[email protected]>
Fri, 21 May 2010 14:29:15 +0000 (07:29 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw:
  GFS2: Fix typo
  GFS2: stuck in inode wait, no glocks stuck
  GFS2: Eliminate useless err variable
  GFS2: Fix writing to non-page aligned gfs2_quota structures
  GFS2: Add some useful messages
  GFS2: fix quota state reporting
  GFS2: Various gfs2_logd improvements
  GFS2: glock livelock
  GFS2: Clean up stuffed file copying
  GFS2: docs update
  GFS2: Remove space from slab cache name

1  2 
fs/gfs2/bmap.c
fs/gfs2/export.c
fs/gfs2/sys.c

diff --combined fs/gfs2/bmap.c
index 5e411d5f4697a2ce2912aa917106a47acc3829b6,0db0cd92a38d92f7dcf882c2d942b037c632da17..4a48c0f4b40275bce81f5c4b5fb40784a45a00bc
@@@ -7,6 -7,7 +7,6 @@@
   * of the GNU General Public License version 2.
   */
  
 -#include <linux/slab.h>
  #include <linux/spinlock.h>
  #include <linux/completion.h>
  #include <linux/buffer_head.h>
@@@ -71,11 -72,13 +71,13 @@@ static int gfs2_unstuffer_page(struct g
  
        if (!PageUptodate(page)) {
                void *kaddr = kmap(page);
+               u64 dsize = i_size_read(inode);
+  
+               if (dsize > (dibh->b_size - sizeof(struct gfs2_dinode)))
+                       dsize = dibh->b_size - sizeof(struct gfs2_dinode);
  
-               memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode),
-                      ip->i_disksize);
-               memset(kaddr + ip->i_disksize, 0,
-                      PAGE_CACHE_SIZE - ip->i_disksize);
+               memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), dsize);
+               memset(kaddr + dsize, 0, PAGE_CACHE_SIZE - dsize);
                kunmap(page);
  
                SetPageUptodate(page);
@@@ -1038,13 -1041,14 +1040,14 @@@ static int trunc_start(struct gfs2_inod
                goto out;
  
        if (gfs2_is_stuffed(ip)) {
-               ip->i_disksize = size;
+               u64 dsize = size + sizeof(struct gfs2_inode);
                ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
                gfs2_trans_add_bh(ip->i_gl, dibh, 1);
                gfs2_dinode_out(ip, dibh->b_data);
-               gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + size);
+               if (dsize > dibh->b_size)
+                       dsize = dibh->b_size;
+               gfs2_buffer_clear_tail(dibh, dsize);
                error = 1;
        } else {
                if (size & (u64)(sdp->sd_sb.sb_bsize - 1))
                        error = gfs2_block_truncate_page(ip->i_inode.i_mapping);
diff --combined fs/gfs2/export.c
index c22c2117483365abed04aba0165df3b2d03b65f3,d81bc7e90e98b1d99a19273c23ecb191bbbab081..dfe237a3f8ad9e2a0f11bae403ff1f1d8687cbd0
@@@ -7,6 -7,7 +7,6 @@@
   * of the GNU General Public License version 2.
   */
  
 -#include <linux/slab.h>
  #include <linux/spinlock.h>
  #include <linux/completion.h>
  #include <linux/buffer_head.h>
@@@ -168,7 -169,7 +168,7 @@@ static struct dentry *gfs2_get_dentry(s
        if (error)
                goto fail;
  
-       inode = gfs2_inode_lookup(sb, DT_UNKNOWN, inum->no_addr, 0, 0);
+       inode = gfs2_inode_lookup(sb, DT_UNKNOWN, inum->no_addr, 0);
        if (IS_ERR(inode)) {
                error = PTR_ERR(inode);
                goto fail;
diff --combined fs/gfs2/sys.c
index 54fd9842599169a3551d8b57d292164406a74480,68d2795f29a815b75d23e0a146415bdaf4429ffc..37f5393e68e6e34c96820ebb682fc2b9942e9004
@@@ -8,6 -8,7 +8,6 @@@
   */
  
  #include <linux/sched.h>
 -#include <linux/slab.h>
  #include <linux/spinlock.h>
  #include <linux/completion.h>
  #include <linux/buffer_head.h>
@@@ -232,6 -233,8 +232,8 @@@ static ssize_t demote_rq_store(struct g
        glops = gfs2_glops_list[gltype];
        if (glops == NULL)
                return -EINVAL;
+       if (!test_and_set_bit(SDF_DEMOTE, &sdp->sd_flags))
+               fs_info(sdp, "demote interface used\n");
        rv = gfs2_glock_get(sdp, glnum, glops, 0, &gl);
        if (rv)
                return rv;
@@@ -468,8 -471,6 +470,6 @@@ static ssize_t name##_store(struct gfs2
  }                                                                             \
  TUNE_ATTR_2(name, name##_store)
  
- TUNE_ATTR(incore_log_blocks, 0);
- TUNE_ATTR(log_flush_secs, 0);
  TUNE_ATTR(quota_warn_period, 0);
  TUNE_ATTR(quota_quantum, 0);
  TUNE_ATTR(max_readahead, 0);
@@@ -481,8 -482,6 +481,6 @@@ TUNE_ATTR(statfs_quantum, 1)
  TUNE_ATTR_3(quota_scale, quota_scale_show, quota_scale_store);
  
  static struct attribute *tune_attrs[] = {
-       &tune_attr_incore_log_blocks.attr,
-       &tune_attr_log_flush_secs.attr,
        &tune_attr_quota_warn_period.attr,
        &tune_attr_quota_quantum.attr,
        &tune_attr_max_readahead.attr,
This page took 0.08401 seconds and 4 git commands to generate.