public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Pankaj Raghav <pankaj.raghav@linux.dev>
To: Dave Chinner <dgc@kernel.org>
Cc: Lukas Herbolt <lukas@herbolt.com>,
	linux-xfs@vger.kernel.org, cem@kernel.org, hch@infradead.org,
	djwong@kernel.org, p.raghav@samsung.com
Subject: Re: [PATCH v11 2/2] xfs: add FALLOC_FL_WRITE_ZEROES to XFS code base
Date: Mon, 16 Mar 2026 08:23:35 +0100	[thread overview]
Message-ID: <2200df0c-0e18-4b9d-bf60-65e692a2b92f@linux.dev> (raw)
In-Reply-To: <abdFmEn7lQKqqbv1@dread>

>>> So, a helper function in fs/xfs/xfs_bmap_util.c such as this:
>>>
>>> /*
>>>  * This function is used to allocate written extents over holes
>>>  * and/or convert unwritten extents to written extents based on the
>>>  * @flags passed to it.
>>>  *
>>>  * If @flags is zero, if will allocate written extents for holes and
>>
>> s/zero/XFS_BMAPI_ZERO ?
> 
> No, I explicitly meant flags = 0.
> 
>>>  * delalloc extents across the range.
>>>  *
>>>  * If XFS_BMAPI_CONVERT is specified in @flags, then it will also do
>>>  * conversion of unwritten extents in the range to written extents.
>>>  *
>>>  * If XFS_BMAPI_ZERO is specified in @flags, then both newly
>>
>> s/XFS_BMAPI_ZERO/(XFS_BMAPI_ZERO | XFS_BMAPI_CONVERT) ?
> 
> No I explictly describing what happens when you do "flags |=
> XFS_BMAPI_ZERO;" to any other xfs_bmapi_write() operation
> flag specification.
> 
> i.e. XFS_BMAPI_ZERO is an optional behavioural modifier for
> allocation and/or unwritten extent conversion operations. i.e all it
> does is add initialisation of the new/modified extents to contain
> real zeroes.
> 
> e.g. flags = 0 means "allocate holes/delalloc as uninitialised
> written extents". flags = 0 | XFS_BMAPI_ZERO
> means "allocate holes/delalloc and initialise them to contain
> zeros". Unwritten extents will not be modified by either operation.
> 

Ok, Thanks for the clarification. I was about to send the patches.
I will make this change and send the patches.

--
Pankaj

  reply	other threads:[~2026-03-16  7:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 18:12 [PATCH v11 2/2] xfs: add FALLOC_FL_WRITE_ZEROES to XFS code base Lukas Herbolt
2026-03-10  0:44 ` Darrick J. Wong
2026-03-10 10:10   ` Pankaj Raghav (Samsung)
2026-03-10 11:22     ` Lukas Herbolt
2026-03-10 15:02       ` Darrick J. Wong
2026-03-10 10:20   ` Lukas Herbolt
2026-03-10 14:57     ` Darrick J. Wong
2026-03-11  0:12 ` Dave Chinner
2026-03-12 21:36   ` Pankaj Raghav (Samsung)
2026-03-15 23:49     ` Dave Chinner
2026-03-16  7:23       ` Pankaj Raghav [this message]
2026-03-16  5:03   ` Lukas Herbolt
2026-03-17 12:20     ` Pankaj Raghav (Samsung)

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=2200df0c-0e18-4b9d-bf60-65e692a2b92f@linux.dev \
    --to=pankaj.raghav@linux.dev \
    --cc=cem@kernel.org \
    --cc=dgc@kernel.org \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=lukas@herbolt.com \
    --cc=p.raghav@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox