linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/3] xfs: attach dquots before performing xfs_swap_extents
Date: Thu, 14 Nov 2019 06:53:54 -0800	[thread overview]
Message-ID: <20191114145354.GA17290@infradead.org> (raw)
In-Reply-To: <20191112221448.GQ4614@dread.disaster.area>

On Wed, Nov 13, 2019 at 09:14:48AM +1100, Dave Chinner wrote:
> If the dquots are not attached to the inode, how would you pass the
> 3 dquots per inode down the stack to where they are actually used
> inside the filesystem? I mean, we have to get the dquots attached to
> the transaction so we can update them in xfs_trans_commit ->
> xfs_trans_apply_dquot_deltas(), so somehow we'd have to get them
> from the high level file/inode operations down to the XFS
> transaction context. And things like writeback need dquots attached
> for delayed allocation, so various aops would need to do dquot
> lookups, too...

My prime idea was to attach them to the transaction and keep them
over transaction roles.  Then see what is left and probably use an
on-stack struct containing three dquots.  At that point I know if
that idea was feasible, because if we have too many deep callstacks
where we need to pass that struct it obviously isn't.

> I can see the advantage of doing rcu dquot cache lookups in the xfs
> context where we are attaching the dquots to the transaction rather
> than attaching them to the inode, but I can't see how the "do it at
> a high level" aspect of this would work....

Most of our ops really just have one transaction / set of rolled
over permanent transactions, because if they didn't they wouldn't
be atomic..

      reply	other threads:[~2019-11-14 14:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11  1:18 [PATCH 0/3] xfs: various fixes Darrick J. Wong
2019-11-11  1:18 ` [PATCH 1/3] xfs: actually check xfs_btree_check_block return in xfs_btree_islastblock Darrick J. Wong
2019-11-11  7:57   ` Christoph Hellwig
2019-11-11  1:18 ` [PATCH 2/3] xfs: attach dquots and reserve quota blocks during unwritten conversion Darrick J. Wong
2019-11-11  7:59   ` Christoph Hellwig
2019-11-11  1:18 ` [PATCH 3/3] xfs: attach dquots before performing xfs_swap_extents Darrick J. Wong
2019-11-11  8:05   ` Christoph Hellwig
2019-11-12 22:14     ` Dave Chinner
2019-11-14 14:53       ` Christoph Hellwig [this message]

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=20191114145354.GA17290@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    /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 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).