From: Linus Torvalds Date: Fri, 21 May 2010 14:29:15 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw X-Git-Tag: v2.6.35-rc1~463 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=677abe49ad017679627af9d3bbd9a7ecb3d94c42;hp=-c Merge git://git./linux/kernel/git/steve/gfs2-2.6-nmw * 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 --- 677abe49ad017679627af9d3bbd9a7ecb3d94c42 diff --combined fs/gfs2/bmap.c index 5e411d5f4697,0db0cd92a38d..4a48c0f4b402 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@@ -7,6 -7,7 +7,6 @@@ * of the GNU General Public License version 2. */ -#include #include #include #include @@@ -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 c22c21174833,d81bc7e90e98..dfe237a3f8ad --- a/fs/gfs2/export.c +++ b/fs/gfs2/export.c @@@ -7,6 -7,7 +7,6 @@@ * of the GNU General Public License version 2. */ -#include #include #include #include @@@ -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 54fd98425991,68d2795f29a8..37f5393e68e6 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@@ -8,6 -8,7 +8,6 @@@ */ #include -#include #include #include #include @@@ -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,