login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
July
»
7
Re: [PATCH 1/3] ocfs2: When zero extending, do it by page.
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Tao Ma
Subject:
Re: [PATCH 1/3] ocfs2: When zero extending, do it by page.
Date: Wednesday, July 7, 2010 - 8:19 am
Hi Joel, Joel Becker wrote:
quoted text
> ocfs2_zero_extend() does its zeroing block by block, but it calls a > function named ocfs2_write_zero_page(). Let's have > ocfs2_write_zero_page() handle the page level. From > ocfs2_zero_extend()'s perspective, it is now page-at-a-time. > > Signed-off-by: Joel Becker <joel.becker@oracle.com> > --- > fs/ocfs2/aops.c | 30 -------------- > fs/ocfs2/file.c | 119 +++++++++++++++++++++++++++++++++++++++---------------- > 2 files changed, 85 insertions(+), 64 deletions(-) > > diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c > index 3623ca2..9a5c931 100644 > --- a/fs/ocfs2/aops.c > +++ b/fs/ocfs2/aops.c > @@ -459,36 +459,6 @@ int walk_page_buffers( handle_t *handle, > return ret; > } > > -handle_t *ocfs2_start_walk_page_trans(struct inode *inode, > - struct page *page, > - unsigned from, > - unsigned to) > -{ > - struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); > - handle_t *handle; > - int ret = 0; > - > - handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); > - if (IS_ERR(handle)) { > - ret = -ENOMEM; > - mlog_errno(ret); > - goto out; > - } > - > - if (ocfs2_should_order_data(inode)) { > - ret = ocfs2_jbd2_file_inode(handle, inode); > - if (ret < 0) > - mlog_errno(ret); > - } > -out: > - if (ret) { > - if (!IS_ERR(handle)) > - ocfs2_commit_trans(osb, handle); > - handle = ERR_PTR(ret); > - } > - return handle; > -} > - > static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) > { > sector_t status; > diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c > index 6a13ea6..a6e0eb6 100644 > --- a/fs/ocfs2/file.c > +++ b/fs/ocfs2/file.c > @@ -724,28 +724,55 @@ leave: > return status; > } > > +/* > + * While a write will already be ordering the data, a truncate will not. > + * Thus, we need to explicitly order the zeroed pages. > + */ > +static handle_t *ocfs2_zero_start_ordered_transaction(struct inode *inode) > +{ > + struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); > + handle_t *handle = NULL; > + int ret = 0; > + > + if (ocfs2_should_order_data(inode)) >
This should be if (!ocfs2_should_order_data(inode)) I guess? ;)
quoted text
> + goto out; > + > + handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); > + if (IS_ERR(handle)) { > + ret = -ENOMEM; > + mlog_errno(ret); > + goto out; > + } > + >
Regards, Tao --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] Revert "writeback: limit write_cache_pages integri ...
, Joel Becker
, (Mon Jun 28, 10:35 am)
Re: [PATCH] Revert "writeback: limit write_cache_pages int ...
, Dave Chinner
, (Mon Jun 28, 5:24 pm)
Re: [PATCH] Revert "writeback: limit write_cache_pages int ...
, Joel Becker
, (Mon Jun 28, 5:54 pm)
Re: [PATCH] Revert "writeback: limit write_cache_pages int ...
, Linus Torvalds
, (Mon Jun 28, 6:12 pm)
Re: [PATCH] Revert "writeback: limit write_cache_pages int ...
, Dave Chinner
, (Mon Jun 28, 6:56 pm)
Re: [Ocfs2-devel] [PATCH] Revert "writeback: limit write_c ...
, Joel Becker
, (Mon Jun 28, 6:58 pm)
Re: [PATCH] Revert "writeback: limit write_cache_pages int ...
, Joel Becker
, (Mon Jun 28, 7:04 pm)
Re: [Ocfs2-devel] [PATCH] Revert "writeback: limit write_c ...
, Linus Torvalds
, (Mon Jun 28, 7:20 pm)
Re: [PATCH] Revert "writeback: limit write_cache_pages int ...
, Dave Chinner
, (Mon Jun 28, 7:27 pm)
Re: [Ocfs2-devel] [PATCH] Revert "writeback: limit write_c ...
, Dave Chinner
, (Mon Jun 28, 7:44 pm)
Re: [PATCH] Revert "writeback: limit write_cache_pages int ...
, Joel Becker
, (Tue Jun 29, 12:18 am)
Re: [Ocfs2-devel] [PATCH] Revert "writeback: limit write_c ...
, Joel Becker
, (Tue Jun 29, 1:16 am)
Re: [Ocfs2-devel] [PATCH] Revert "writeback: limit write_c ...
, Joel Becker
, (Tue Jun 29, 6:30 pm)
[PATCH] ocfs2: Zero the tail cluster when extending past i ...
, Joel Becker
, (Fri Jul 2, 3:49 pm)
[PATCH 1/2] ocfs2: Zero the tail cluster when extending pa ...
, Joel Becker
, (Sat Jul 3, 2:32 pm)
[PATCH 2/2] ocfs2: No need to zero pages past i_size. i_si ...
, Joel Becker
, (Sat Jul 3, 2:33 pm)
Re: [PATCH 2/2] ocfs2: No need to zero pages past i_size. ...
, Tao Ma
, (Sun Jul 4, 8:13 am)
Re: [PATCH 2/2] ocfs2: No need to zero pages past i_size. ...
, Tao Ma
, (Sun Jul 4, 6:38 pm)
Re: [PATCH 1/2] ocfs2: Zero the tail cluster when extendin ...
, Tao Ma
, (Sun Jul 4, 8:51 pm)
Re: [PATCH 2/2] ocfs2: No need to zero pages past i_size. ...
, Joel Becker
, (Tue Jul 6, 12:09 am)
Re: [PATCH 2/2] ocfs2: No need to zero pages past i_size. ...
, Joel Becker
, (Tue Jul 6, 12:10 am)
Re: [PATCH 1/2] ocfs2: Zero the tail cluster when extendin ...
, Joel Becker
, (Tue Jul 6, 12:17 am)
Re: [PATCH 1/2] ocfs2: Zero the tail cluster when extendin ...
, Tao Ma
, (Tue Jul 6, 12:54 am)
Re: [PATCH 1/2] ocfs2: Zero the tail cluster when extendin ...
, Joel Becker
, (Tue Jul 6, 4:58 am)
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: No need to zero pages ...
, Joel Becker
, (Tue Jul 6, 11:39 am)
Re: [PATCH 1/2] ocfs2: Zero the tail cluster when extendin ...
, Joel Becker
, (Tue Jul 6, 11:48 am)
Re: [PATCH 1/2] ocfs2: Zero the tail cluster when extendin ...
, Joel Becker
, (Tue Jul 6, 11:57 am)
Re: [Ocfs2-devel] [PATCH] Revert "writeback: limit write_c ...
, Joel Becker
, (Tue Jul 6, 12:06 pm)
Re: [PATCH 1/2] ocfs2: Zero the tail cluster when extendin ...
, Tao Ma
, (Tue Jul 6, 5:42 pm)
Re: [PATCH 1/2] ocfs2: Zero the tail cluster when extendin ...
, Joel Becker
, (Tue Jul 6, 7:03 pm)
[PATCH 0/3] ocfs2: Tail zeroing fixes.
, Joel Becker
, (Wed Jul 7, 4:16 am)
[PATCH 1/3] ocfs2: When zero extending, do it by page.
, Joel Becker
, (Wed Jul 7, 4:16 am)
[PATCH 2/3] ocfs2: Zero the tail cluster when extending pa ...
, Joel Becker
, (Wed Jul 7, 4:16 am)
[PATCH 3/3] ocfs2: No need to zero pages past i_size.
, Joel Becker
, (Wed Jul 7, 4:16 am)
Re: [PATCH 1/3] ocfs2: When zero extending, do it by page.
, Tao Ma
, (Wed Jul 7, 8:19 am)
Re: [PATCH 1/3] ocfs2: When zero extending, do it by page.
, Joel Becker
, (Wed Jul 7, 1:04 pm)
Re: [PATCH 1/3] ocfs2: When zero extending, do it by page.
, Tao Ma
, (Wed Jul 7, 8:44 pm)
Re: [PATCH 1/3] ocfs2: When zero extending, do it by page.
, Joel Becker
, (Thu Jul 8, 2:51 am)
Re: [Ocfs2-devel] [PATCH 0/3] ocfs2: Tail zeroing fixes.
, Joel Becker
, (Mon Jul 12, 3:45 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Re: [PATCH 1/1] staging: hv: Fix race condition on IC channel initialization (modi...
Sam Ravnborg
[PATCH 05/11] x86: add X86_64 dependency to x86_64 specific symbols in Kconfig.x86...
Christoph Lameter
Re: [PATCH 02/40] mm: slab allocation fairness
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
Brian Swetland
Re: Attempted summary of suspend-blockers LKML thread
git
:
Felipe Contreras
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Paolo Ciarrocchi
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Sverre Rabbelier
Re: [GSoC] What is status of Git's Google Summer of Code 2008 projects?
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Peter Oberndorfer
Subject: [PATCH] fix stg edit command
freebsd-fs
:
Andriy Gapon
Re: Locked up processes after upgrade to ZFS v15
Eirik Øverby
Re: Areca vs. ZFS performance testing.
Hywel Mallett
Re: Should gmirrored gjournal provider have auto-synchronization?
Thomas Steen Rasmussen
Re: HAST initial sync speed
Mark Linimon
Re: [RFC] Remove NTFS kernel support
linux-netdev
:
Andi Kleen
Re: RFC: Nagle latency tuning
Jarek Poplawski
Re: tc filter flow hash question
David Miller
Re: [RFC 0/5] generic rx recycling
Chuck Lever
Re: [RFC] ipv6: Change %pI6 format to output compacted addresses?
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
dragonflybsd-user
:
Jonas
Re: New to DragonFly...
Nikolai Lifanov
pkgsrc issues
Andreas Hauser
Re: Transset.
Tomas
usb printer Brother HL-2030 and DragonFly
Matthew Dillon
Re: DragonFlyBSD not in compliance with RFC 1122
Colocation donated by:
Syndicate