All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Thorsten Blum <blum@kernel.org>
Cc: "Theodore Y. Ts'o" <tytso@mit.edu>,
	Richard Weinberger <richard@nod.at>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org,
	Jaegeuk Kim <jaegeuk@kernel.org>, David Sterba <dsterba@suse.com>,
	Chris Mason <mason@kernel.org>,
	linux-btrfs@vger.kernel.org
Subject: Re: [f2fs-dev] [PATCH 0/4] fscrypt: Add FSTR() helper macro and convert initializers
Date: Tue, 17 Nov 2026 21:01:58 -0800	[thread overview]
Message-ID: <20261118050158.GC3400@sol> (raw)
In-Reply-To: <20261118002845.574426-6-blum@kernel.org>

On Wed, Nov 18, 2026 at 01:28:46AM +0100, Thorsten Blum wrote:
> Similar to QSTR(), add FSTR() to initialize struct fscrypt_str from a
> NUL-terminated string without specifying its length.
> 
> Use the helper for 8 initializers in btrfs, F2FS, and UBIFS, replacing
> hard-coded lengths and explicit strlen() calls.

It would be worth stating explicitly that the new strlen() calls are
constant-folded in most configurations (if they indeed are).

- Eric


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: Thorsten Blum <blum@kernel.org>
Cc: David Sterba <dsterba@suse.com>, Chris Mason <mason@kernel.org>,
	Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
	Richard Weinberger <richard@nod.at>,
	Zhihao Cheng <chengzhihao1@huawei.com>,
	"Theodore Y. Ts'o" <tytso@mit.edu>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-mtd@lists.infradead.org, linux-fscrypt@vger.kernel.org
Subject: Re: [PATCH 0/4] fscrypt: Add FSTR() helper macro and convert initializers
Date: Tue, 17 Nov 2026 21:01:58 -0800	[thread overview]
Message-ID: <20261118050158.GC3400@sol> (raw)
In-Reply-To: <20261118002845.574426-6-blum@kernel.org>

On Wed, Nov 18, 2026 at 01:28:46AM +0100, Thorsten Blum wrote:
> Similar to QSTR(), add FSTR() to initialize struct fscrypt_str from a
> NUL-terminated string without specifying its length.
> 
> Use the helper for 8 initializers in btrfs, F2FS, and UBIFS, replacing
> hard-coded lengths and explicit strlen() calls.

It would be worth stating explicitly that the new strlen() calls are
constant-folded in most configurations (if they indeed are).

- Eric

WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: Thorsten Blum <blum@kernel.org>
Cc: David Sterba <dsterba@suse.com>, Chris Mason <mason@kernel.org>,
	Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
	Richard Weinberger <richard@nod.at>,
	Zhihao Cheng <chengzhihao1@huawei.com>,
	"Theodore Y. Ts'o" <tytso@mit.edu>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-mtd@lists.infradead.org, linux-fscrypt@vger.kernel.org
Subject: Re: [PATCH 0/4] fscrypt: Add FSTR() helper macro and convert initializers
Date: Tue, 17 Nov 2026 21:01:58 -0800	[thread overview]
Message-ID: <20261118050158.GC3400@sol> (raw)
In-Reply-To: <20261118002845.574426-6-blum@kernel.org>

On Wed, Nov 18, 2026 at 01:28:46AM +0100, Thorsten Blum wrote:
> Similar to QSTR(), add FSTR() to initialize struct fscrypt_str from a
> NUL-terminated string without specifying its length.
> 
> Use the helper for 8 initializers in btrfs, F2FS, and UBIFS, replacing
> hard-coded lengths and explicit strlen() calls.

It would be worth stating explicitly that the new strlen() calls are
constant-folded in most configurations (if they indeed are).

- Eric

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2026-11-18  5:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  0:28 [PATCH 0/4] fscrypt: Add FSTR() helper macro and convert initializers Thorsten Blum
2026-11-18  0:28 ` Thorsten Blum
2026-11-18  0:28 ` [f2fs-dev] " Thorsten Blum via Linux-f2fs-devel
2026-11-18  0:28 ` [PATCH 1/4] fscrypt: Add FSTR() helper macro Thorsten Blum
2026-11-18  0:28   ` Thorsten Blum
2026-11-18  0:28   ` [f2fs-dev] " Thorsten Blum via Linux-f2fs-devel
2026-11-18  0:28 ` [PATCH 2/4] btrfs: Use FSTR() for the "default" name Thorsten Blum
2026-11-18  0:28   ` Thorsten Blum
2026-11-18  0:28   ` [f2fs-dev] " Thorsten Blum via Linux-f2fs-devel
2026-11-18  0:28 ` [PATCH 3/4] f2fs: Use FSTR() in f2fs_do_make_empty_dir() Thorsten Blum
2026-11-18  0:28   ` Thorsten Blum
2026-11-18  0:28   ` [f2fs-dev] " Thorsten Blum via Linux-f2fs-devel
2026-11-18  0:28 ` [PATCH 4/4] ubifs: Use FSTR() in ubifs_xattr_{set,get,remove}() Thorsten Blum
2026-11-18  0:28   ` Thorsten Blum
2026-11-18  0:28   ` [f2fs-dev] [PATCH 4/4] ubifs: Use FSTR() in ubifs_xattr_{set, get, remove}() Thorsten Blum via Linux-f2fs-devel
2026-11-18  0:34   ` [PATCH 4/4] ubifs: Use FSTR() in ubifs_xattr_{set,get,remove}() sashiko-bot
2026-11-18  0:34     ` sashiko-bot
2026-11-18  0:35   ` sashiko-bot
2026-11-18  0:35     ` sashiko-bot
2026-11-18  5:01 ` Eric Biggers via Linux-f2fs-devel [this message]
2026-11-18  5:01   ` [PATCH 0/4] fscrypt: Add FSTR() helper macro and convert initializers Eric Biggers
2026-11-18  5:01   ` Eric Biggers

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=20261118050158.GC3400@sol \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=blum@kernel.org \
    --cc=dsterba@suse.com \
    --cc=ebiggers@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mason@kernel.org \
    --cc=richard@nod.at \
    --cc=tytso@mit.edu \
    /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.