* [Ocfs2-devel] [PATCH] ocfs2: send SIGXFSZ if new filesize exceeds limit -v2
@ 2010-02-26 10:18 Wengang Wang
2010-02-28 4:11 ` Joel Becker
0 siblings, 1 reply; 2+ messages in thread
From: Wengang Wang @ 2010-02-26 10:18 UTC (permalink / raw)
To: ocfs2-devel
This patch makes ocfs2 send SIGXFSZ if new file size exceeds limit and abort the
operation.
No suprise that processes get SIGXFSZ on one node(in the cluster) while they
don't on another if file size limits are different on the two nodes.
Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
---
fs/ocfs2/file.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 558ce03..a118cb0 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -993,10 +993,9 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
}
if (size_change && attr->ia_size != i_size_read(inode)) {
- if (attr->ia_size > sb->s_maxbytes) {
- status = -EFBIG;
+ status = inode_newsize_ok(inode, attr->ia_size);
+ if (status)
goto bail_unlock;
- }
if (i_size_read(inode) > attr->ia_size) {
if (ocfs2_should_order_data(inode)) {
--
1.6.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2: send SIGXFSZ if new filesize exceeds limit -v2
2010-02-26 10:18 [Ocfs2-devel] [PATCH] ocfs2: send SIGXFSZ if new filesize exceeds limit -v2 Wengang Wang
@ 2010-02-28 4:11 ` Joel Becker
0 siblings, 0 replies; 2+ messages in thread
From: Joel Becker @ 2010-02-28 4:11 UTC (permalink / raw)
To: ocfs2-devel
On Fri, Feb 26, 2010 at 06:18:25PM +0800, Wengang Wang wrote:
> This patch makes ocfs2 send SIGXFSZ if new file size exceeds limit and abort the
> operation.
> No suprise that processes get SIGXFSZ on one node(in the cluster) while they
> don't on another if file size limits are different on the two nodes.
>
> Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
This patch is now in the 'merge-window' branch of ocfs2.git.
Joel
--
"A narcissist is someone better looking than you are."
- Gore Vidal
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-28 4:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-26 10:18 [Ocfs2-devel] [PATCH] ocfs2: send SIGXFSZ if new filesize exceeds limit -v2 Wengang Wang
2010-02-28 4:11 ` Joel Becker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.