* [Cluster-devel] GFS2: Small fixes
@ 2009-01-07 9:16 Steven Whitehouse
2009-01-07 9:16 ` [Cluster-devel] [PATCH 1/3] GFS2: Set GFP_NOFS when allocating page on write Steven Whitehouse
0 siblings, 1 reply; 4+ messages in thread
From: Steven Whitehouse @ 2009-01-07 9:16 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Here are three small one-liner fixes which I'm about to send a
pull request for,
Steve.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Cluster-devel] [PATCH 1/3] GFS2: Set GFP_NOFS when allocating page on write
2009-01-07 9:16 [Cluster-devel] GFS2: Small fixes Steven Whitehouse
@ 2009-01-07 9:16 ` Steven Whitehouse
2009-01-07 9:16 ` [Cluster-devel] [PATCH 2/3] GFS2: LSF and LBD are now one and the same Steven Whitehouse
0 siblings, 1 reply; 4+ messages in thread
From: Steven Whitehouse @ 2009-01-07 9:16 UTC (permalink / raw)
To: cluster-devel.redhat.com
We need to ensure that we always set GFP_NOFS in this one
particular case when allocating pages for write.
Reported-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 6e4ea36..4ddab67 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -675,6 +675,7 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
goto out_trans_fail;
error = -ENOMEM;
+ flags |= AOP_FLAG_NOFS;
page = grab_cache_page_write_begin(mapping, index, flags);
*pagep = page;
if (unlikely(!page))
--
1.6.0.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Cluster-devel] [PATCH 2/3] GFS2: LSF and LBD are now one and the same
2009-01-07 9:16 ` [Cluster-devel] [PATCH 1/3] GFS2: Set GFP_NOFS when allocating page on write Steven Whitehouse
@ 2009-01-07 9:16 ` Steven Whitehouse
2009-01-07 9:16 ` [Cluster-devel] [PATCH 3/3] GFS2: Fix typo in gfs_page_mkwrite() Steven Whitehouse
0 siblings, 1 reply; 4+ messages in thread
From: Steven Whitehouse @ 2009-01-07 9:16 UTC (permalink / raw)
To: cluster-devel.redhat.com
As a result of this recent patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=b3a6ffe16b5cc48abe7db8d04882dc45280eb693
We only need to depend on LBD.
Reported-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
index ab2f57e..e563a64 100644
--- a/fs/gfs2/Kconfig
+++ b/fs/gfs2/Kconfig
@@ -1,6 +1,6 @@
config GFS2_FS
tristate "GFS2 file system support"
- depends on EXPERIMENTAL && (64BIT || (LSF && LBD))
+ depends on EXPERIMENTAL && (64BIT || LBD)
select FS_POSIX_ACL
select CRC32
help
--
1.6.0.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Cluster-devel] [PATCH 3/3] GFS2: Fix typo in gfs_page_mkwrite()
2009-01-07 9:16 ` [Cluster-devel] [PATCH 2/3] GFS2: LSF and LBD are now one and the same Steven Whitehouse
@ 2009-01-07 9:16 ` Steven Whitehouse
0 siblings, 0 replies; 4+ messages in thread
From: Steven Whitehouse @ 2009-01-07 9:16 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Benjamin Marzinski <bmarzins@redhat.com>
There is a typo in gfs2_page_mkwrite()
gfs2_write_alloc_required() expects pos to be the offset in bytes. However,
instead of the page index being shifted by by PAGE_CACHE_SHIFT, it was shifted
by (PAGE_CACHE_SIZE - inode->i_blkbits). This patch simply shifts the page
index by the proper amount.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 289c5f5..93fe41b 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -342,7 +342,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page)
struct gfs2_inode *ip = GFS2_I(inode);
struct gfs2_sbd *sdp = GFS2_SB(inode);
unsigned long last_index;
- u64 pos = page->index << (PAGE_CACHE_SIZE - inode->i_blkbits);
+ u64 pos = page->index << PAGE_CACHE_SHIFT;
unsigned int data_blocks, ind_blocks, rblocks;
int alloc_required = 0;
struct gfs2_holder gh;
--
1.6.0.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-07 9:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 9:16 [Cluster-devel] GFS2: Small fixes Steven Whitehouse
2009-01-07 9:16 ` [Cluster-devel] [PATCH 1/3] GFS2: Set GFP_NOFS when allocating page on write Steven Whitehouse
2009-01-07 9:16 ` [Cluster-devel] [PATCH 2/3] GFS2: LSF and LBD are now one and the same Steven Whitehouse
2009-01-07 9:16 ` [Cluster-devel] [PATCH 3/3] GFS2: Fix typo in gfs_page_mkwrite() Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).