From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 02/15] ocfs2: Add clusters free in dealloc_ctxt.
Date: Mon, 3 Nov 2008 23:40:40 -0800 [thread overview]
Message-ID: <20081104074040.GA27901@mail.oracle.com> (raw)
In-Reply-To: <20081104030157.GC16483@mail.oracle.com>
On Mon, Nov 03, 2008 at 07:01:57PM -0800, Joel Becker wrote:
> Your 64K can be 16 clusters at a 4K cluster size. That's 16
> records. What if the truncate log had only space for three records from
> a previous operation? Your fourth call to ocfs2_truncate_log_append()
> will mlog_bug_on_msg() like so:
>
> 5319 mlog_bug_on_msg(tl_count > ocfs2_truncate_recs_per_inode(osb->sb) ||
>
> That is not acceptable. We don't introduce known bugs and say
> they are OK if they are rare.
I want to clarify what I'm talking about here.
There are a few places in ocfs2 where we can't clean up from an
error perfectly. A recent example was in truncate. In
ocfs2_do_truncate(), we can possibly get an error like -EIO or -ENOMEM
inside ocfs2_trim_tree(). If that happens, the inode will have more
clusters allocated to it than specified by ip_clusters. Since there is
no easy way to either complete the truncate or restore the allocation,
we leave the inode as-is. The allocation code is taught to handle the
case where i_clusters is smaller than the actual allocated number.
The key fact is that the error is an unexpected case. -EIO
happens because the disk array went offline or there was a bad sector.
It's not part of normal operation. Even with it not being part of
normal operation, the filesystem can continue normal operations. There
is no corruption, no BUG() is tripped, and if the rest of the disk is
fine, things continue to work.
In the code above, adding records to the truncate log is normal
operation. The truncate log can be almost full as a part of normal
operation. Thus, it should never cause an error or a crash.
Joel
--
Life's Little Instruction Book #444
"Never underestimate the power of a kind word or deed."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2008-11-04 7:40 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 11:31 [Ocfs2-devel] [PATCH 00/15] ocfs2: add security EA and ACL support V4 Tiger Yang
2008-10-30 5:42 ` [Ocfs2-devel] [PATCH 01/15] ocfs2/xattr: Only extend xattr bucket in need Tao Ma
2008-11-06 19:45 ` Mark Fasheh
2008-11-07 1:05 ` Tao Ma
2008-10-30 5:42 ` [Ocfs2-devel] [PATCH 02/15] ocfs2: Add clusters free in dealloc_ctxt Tao Ma
2008-11-04 1:16 ` Joel Becker
2008-11-04 1:34 ` Tao Ma
2008-11-04 3:01 ` Joel Becker
2008-11-04 3:07 ` Tao Ma
2008-11-04 7:40 ` Joel Becker [this message]
2008-11-04 23:25 ` [Ocfs2-devel] [PATCH 02/15] ocfs2: Add clusters free in dealloc_ctxt.v2 Tao Ma
2008-11-05 22:25 ` Joel Becker
2008-11-06 6:08 ` Tao Ma
2008-10-30 5:42 ` [Ocfs2-devel] [PATCH 03/15] ocfs2/xattr: Move clusters free into dealloc Tao Ma
2008-11-04 3:17 ` Joel Becker
2008-10-30 5:42 ` [Ocfs2-devel] [PATCH 04/15] ocfs2/xattr: Reserve meta/data at the beginning of ocfs2_xattr_set Tao Ma
2008-11-07 0:11 ` Mark Fasheh
2008-11-07 1:10 ` Tao Ma
2008-10-30 5:42 ` [Ocfs2-devel] [PATCH 05/15] ocfs2/xattr: Merge xattr set transaction Tao Ma
2008-11-07 22:46 ` Joel Becker
2008-10-30 11:40 ` [Ocfs2-devel] [PATCH 06/15] ocfs2: move new_inode out of the transaction Tiger Yang
2008-11-07 1:02 ` Mark Fasheh
2008-10-30 11:40 ` [Ocfs2-devel] [PATCH 07/15] ocfs2: add ocfs2_xattr_set_handle Tiger Yang
2008-11-07 1:03 ` Mark Fasheh
2008-10-30 11:40 ` [Ocfs2-devel] [PATCH 08/15] ocfs2: add security xattr API Tiger Yang
2008-11-07 1:17 ` Mark Fasheh
2008-11-07 1:17 ` Mark Fasheh
2008-10-30 11:41 ` [Ocfs2-devel] [PATCH 09/15] ocfs2: add ocfs2_init_security in mkno Tiger Yang
2008-10-30 11:41 ` [Ocfs2-devel] [PATCH 10/15] ocfs2: add ocfs2_xattr_get_nolock Tiger Yang
2008-10-30 11:41 ` [Ocfs2-devel] [PATCH 11/15] ocfs2: add POSIX ACL API Tiger Yang
2008-11-07 1:26 ` Mark Fasheh
2008-10-30 11:41 ` [Ocfs2-devel] [PATCH 12/15] ocfs2: add ocfs2_check_acl Tiger Yang
2008-10-30 11:42 ` [Ocfs2-devel] [PATCH 13/15] ocfs2: add ocfs2_acl_chmod Tiger Yang
2008-11-07 1:33 ` Mark Fasheh
2008-10-30 11:42 ` [Ocfs2-devel] [PATCH 14/15] ocfs2: add ocfs2_init_acl in mknod Tiger Yang
2008-10-30 11:42 ` [Ocfs2-devel] [PATCH 15/15] ocfs2: add mount option and Kconfig option for acl Tiger Yang
2008-10-30 13:45 ` [Ocfs2-devel] [PATCH 00/15] ocfs2: add security EA and ACL support V4 Tao Ma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081104074040.GA27901@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.