From: Darwin <darwin.xupt@gmail.com> To: "Darrick J. Wong" <darrick.wong@oracle.com> Cc: mfasheh@versity.com, jlbec@evilplan.org, linux-fsdevel@vger.kernel.org, ocfs2-devel <ocfs2-devel@oss.oracle.com> Subject: Re: [Ocfs2-devel] [PATCH 4/6] ocfs2: budget for extent tree splits when adding refcount flag Date: Thu, 10 Nov 2016 17:20:27 +0800 [thread overview] Message-ID: <CACbbJyYped4uF9rnEJ0RZ5dK54e8PAo8jamHpcWznb5obJ_bOw@mail.gmail.com> (raw) In-Reply-To: <147873189167.2820.5870521669010779004.stgit@birch.djwong.org> Hello, On Thu, Nov 10, 2016 at 6:51 AM, Darrick J. Wong <darrick.wong@oracle.com> wrote: > When we're adding the refcount flag to an extent, we have to budget > enough space to handle a full extent btree split in addition to May I ask some questions (possibly stupid): 1) why and when would extend btree split? From my understanding, if I do $cp --reflink a b a is not inline-data. refcount tree will be allocated, every extent record of "a" will refer to refcount record respectively and be marked with refcounted, operations like this also for "b". So, I think splitting only happens when writing on them, CMIIW;-) 2) what do you mean by "*full* extent btree"? > whatever modifications have to be made to the refcount btree. We > don't currently do this, with the result that generic/186 crashes > when we need an extent split but not a refcount split because meta_ac > never gets allocated. 3) in what situation, will this happen? - "we need an extent split but not a refcount split". Could you please explain more by example? Thanks, Darwin > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> > --- > fs/ocfs2/refcounttree.c | 3 +++ > 1 file changed, 3 insertions(+) > > > diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c > index 59be8f4..d92b6c6 100644 > --- a/fs/ocfs2/refcounttree.c > +++ b/fs/ocfs2/refcounttree.c > @@ -3698,6 +3698,9 @@ int ocfs2_add_refcount_flag(struct inode *inode, > struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); > struct ocfs2_alloc_context *meta_ac = NULL; > > + /* We need to be able to handle at least an extent tree split. */ > + ref_blocks = ocfs2_extend_meta_needed(data_et->et_root_el); > + > ret = ocfs2_calc_refcount_meta_credits(inode->i_sb, > ref_ci, ref_root_bh, > p_cluster, num_clusters, > > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel@oss.oracle.com > https://oss.oracle.com/mailman/listinfo/ocfs2-devel -- Thanks, Darwin
WARNING: multiple messages have this Message-ID (diff)
From: Darwin <darwin.xupt@gmail.com> To: "Darrick J. Wong" <darrick.wong@oracle.com> Cc: mfasheh@versity.com, jlbec@evilplan.org, linux-fsdevel@vger.kernel.org, ocfs2-devel <ocfs2-devel@oss.oracle.com> Subject: [Ocfs2-devel] [PATCH 4/6] ocfs2: budget for extent tree splits when adding refcount flag Date: Thu, 10 Nov 2016 17:20:27 +0800 [thread overview] Message-ID: <CACbbJyYped4uF9rnEJ0RZ5dK54e8PAo8jamHpcWznb5obJ_bOw@mail.gmail.com> (raw) In-Reply-To: <147873189167.2820.5870521669010779004.stgit@birch.djwong.org> Hello, On Thu, Nov 10, 2016 at 6:51 AM, Darrick J. Wong <darrick.wong@oracle.com> wrote: > When we're adding the refcount flag to an extent, we have to budget > enough space to handle a full extent btree split in addition to May I ask some questions (possibly stupid): 1) why and when would extend btree split? From my understanding, if I do $cp --reflink a b a is not inline-data. refcount tree will be allocated, every extent record of "a" will refer to refcount record respectively and be marked with refcounted, operations like this also for "b". So, I think splitting only happens when writing on them, CMIIW;-) 2) what do you mean by "*full* extent btree"? > whatever modifications have to be made to the refcount btree. We > don't currently do this, with the result that generic/186 crashes > when we need an extent split but not a refcount split because meta_ac > never gets allocated. 3) in what situation, will this happen? - "we need an extent split but not a refcount split". Could you please explain more by example? Thanks, Darwin > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> > --- > fs/ocfs2/refcounttree.c | 3 +++ > 1 file changed, 3 insertions(+) > > > diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c > index 59be8f4..d92b6c6 100644 > --- a/fs/ocfs2/refcounttree.c > +++ b/fs/ocfs2/refcounttree.c > @@ -3698,6 +3698,9 @@ int ocfs2_add_refcount_flag(struct inode *inode, > struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); > struct ocfs2_alloc_context *meta_ac = NULL; > > + /* We need to be able to handle at least an extent tree split. */ > + ref_blocks = ocfs2_extend_meta_needed(data_et->et_root_el); > + > ret = ocfs2_calc_refcount_meta_credits(inode->i_sb, > ref_ci, ref_root_bh, > p_cluster, num_clusters, > > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com > https://oss.oracle.com/mailman/listinfo/ocfs2-devel -- Thanks, Darwin
next prev parent reply other threads:[~2016-11-10 9:20 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-11-09 22:51 [PATCH 0/6] ocfs2: wire up {clone,copy,dedupe}_range Darrick J. Wong 2016-11-09 22:51 ` [Ocfs2-devel] [PATCH 0/6] ocfs2: wire up {clone, copy, dedupe}_range Darrick J. Wong 2016-11-09 22:51 ` [PATCH 1/6] ocfs2: convert inode refcount test to a helper Darrick J. Wong 2016-11-09 22:51 ` [Ocfs2-devel] " Darrick J. Wong 2016-11-10 2:14 ` Eric Ren 2016-11-10 2:14 ` [Ocfs2-devel] " Eric Ren 2016-11-10 17:51 ` Darrick J. Wong 2016-11-10 17:51 ` [Ocfs2-devel] " Darrick J. Wong 2016-11-10 17:52 ` [PATCH v2 " Darrick J. Wong 2016-11-10 17:52 ` [Ocfs2-devel] " Darrick J. Wong 2016-11-09 22:51 ` [PATCH 2/6] ocfs2: add newlines to some error messages Darrick J. Wong 2016-11-09 22:51 ` [Ocfs2-devel] " Darrick J. Wong 2016-11-09 22:51 ` [PATCH 3/6] ocfs2: prohibit refcounted swapfiles Darrick J. Wong 2016-11-09 22:51 ` [Ocfs2-devel] " Darrick J. Wong 2016-11-09 22:51 ` [PATCH 4/6] ocfs2: budget for extent tree splits when adding refcount flag Darrick J. Wong 2016-11-09 22:51 ` [Ocfs2-devel] " Darrick J. Wong 2016-11-10 9:20 ` Darwin [this message] 2016-11-10 9:20 ` Darwin 2016-11-10 17:11 ` Darrick J. Wong 2016-11-10 17:11 ` Darrick J. Wong 2016-11-11 3:00 ` Darwin 2016-11-11 3:00 ` Darwin 2016-11-09 22:51 ` [PATCH 5/6] ocfs2: don't eat io errors during _dio_end_io_write Darrick J. Wong 2016-11-09 22:51 ` [Ocfs2-devel] " Darrick J. Wong 2016-11-09 22:51 ` [PATCH 6/6] ocfs2: implement the VFS clone_range, copy_range, and dedupe_range features Darrick J. Wong 2016-11-09 22:51 ` [Ocfs2-devel] " Darrick J. Wong 2016-11-11 5:49 ` Eric Ren 2016-11-11 5:49 ` Eric Ren 2016-11-11 6:20 ` Darrick J. Wong 2016-11-11 6:20 ` Darrick J. Wong 2016-11-11 6:45 ` Eric Ren 2016-11-11 6:45 ` Eric Ren 2016-11-11 9:01 ` Darrick J. Wong 2016-11-11 9:01 ` Darrick J. Wong 2016-11-11 14:54 ` [PATCH v2 " Darrick J. Wong 2016-11-11 14:54 ` [Ocfs2-devel] " Darrick J. Wong 2016-11-09 23:00 ` [PATCH 7/6] xfstests: fix some minor problems testing ocfs2 Darrick J. Wong 2016-11-09 23:00 ` [Ocfs2-devel] " Darrick J. Wong 2016-11-11 3:15 ` [PATCH 0/6] ocfs2: wire up {clone,copy,dedupe}_range Eric Ren 2016-11-11 3:15 ` [Ocfs2-devel] [PATCH 0/6] ocfs2: wire up {clone, copy, dedupe}_range Eric Ren 2016-11-11 15:05 ` [PATCH 0/6] ocfs2: wire up {clone,copy,dedupe}_range Darrick J. Wong 2016-11-11 15:05 ` [Ocfs2-devel] [PATCH 0/6] ocfs2: wire up {clone, copy, dedupe}_range Darrick J. Wong
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=CACbbJyYped4uF9rnEJ0RZ5dK54e8PAo8jamHpcWznb5obJ_bOw@mail.gmail.com \ --to=darwin.xupt@gmail.com \ --cc=darrick.wong@oracle.com \ --cc=jlbec@evilplan.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=mfasheh@versity.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: linkBe 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.