Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Pankaj Raghav <p.raghav@samsung.com>
Cc: linux-xfs@vger.kernel.org, bfoster@redhat.com, lukas@herbolt.com,
	"Darrick J . Wong" <djwong@kernel.org>,
	dgc@kernel.org, gost.dev@samsung.com, pankaj.raghav@linux.dev,
	andres@anarazel.de, kundan.kumar@samsung.com, cem@kernel.org,
	hch@infradead.org
Subject: Re: [PATCH v3 1/3] xfs: add xfs_bmap_alloc_or_convert_range function
Date: Fri, 24 Apr 2026 06:52:06 -0700	[thread overview]
Message-ID: <aet1hhhRPGg5eGmK@infradead.org> (raw)
In-Reply-To: <20260420105539.3644999-2-p.raghav@samsung.com>

> +/*
> + * 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.

You can and should use up all 80 characters for comments.

> + */
> +int
> +xfs_bmap_alloc_or_convert_range(
> +	struct xfs_inode	*ip,
> +	xfs_off_t		offset,
> +	xfs_off_t		count,
> +	uint32_t		flags,
> +	bool			update_isize)
> +{

Please keep this function in the same please as the generalized
version it was base on so that git diff/show shows what changed.
If you have to move it around for later patches do that in
an otherwise no-op prep patch.

> +		} else {
> +			/*
> +			 * We might allocate data blocks (needs resblks + 1 split) or
> +			 * convert an unwritten extent (needs 0 data blocks + 2 splits).
> +			 * Ensure we have enough block reservation for the worst case.
> +			 */
> +			resblks = XFS_FILBLKS_MIN(count_fsb, XFS_MAX_BMBT_EXTLEN);

Please avoid the overly long lines.


  reply	other threads:[~2026-04-24 13:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 10:55 [PATCH v3 0/3] add FALLOC_FL_WRITE_ZEROES support to xfs Pankaj Raghav
2026-04-20 10:55 ` [PATCH v3 1/3] xfs: add xfs_bmap_alloc_or_convert_range function Pankaj Raghav
2026-04-24 13:52   ` Christoph Hellwig [this message]
2026-04-26  6:35     ` Pankaj Raghav
2026-04-20 10:55 ` [PATCH v3 2/3] xfs: add support for FALLOC_FL_WRITE_ZEROES Pankaj Raghav
2026-04-20 10:55 ` [PATCH v3 3/3] xfs: add a sysfs entry to enable write zeroes even if HW does not support it Pankaj Raghav
2026-04-24 13:52   ` Christoph Hellwig
2026-04-26  6:28     ` Pankaj Raghav

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=aet1hhhRPGg5eGmK@infradead.org \
    --to=hch@infradead.org \
    --cc=andres@anarazel.de \
    --cc=bfoster@redhat.com \
    --cc=cem@kernel.org \
    --cc=dgc@kernel.org \
    --cc=djwong@kernel.org \
    --cc=gost.dev@samsung.com \
    --cc=kundan.kumar@samsung.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=lukas@herbolt.com \
    --cc=p.raghav@samsung.com \
    --cc=pankaj.raghav@linux.dev \
    /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