From: Benjamin Marzinski <bmarzins@redhat.com>
To: Alex Brett <alex.brett@citrix.com>
Cc: dm-devel@lists.linux.dev, Martin Wilck <mwilck@suse.com>
Subject: Re: [PATCH] libmultipath: open_file: rewind after writing the header
Date: Fri, 6 Nov 2026 15:06:20 -0500 [thread overview]
Message-ID: <au4zPAAiuq-yQpYQ@redhat.com> (raw)
In-Reply-To: <20261106152444.1541438-1-alex.brett@citrix.com>
On Fri, Nov 06, 2026 at 03:24:44PM +0000, Alex Brett wrote:
> When creating a new file, open_file() returns it with the offset after
> the header it has just written, but on opening an existing file it will
> return it with the offset at 0.
>
> _read_bindings_file() reads sequentially from the returned fd, so on a
> newly created bindings file the header check in _check_bindings_file()
> hits EOF and declares the file bad. Without -B this is masked by
> rewriting the file, but "multipath -B" may not write it and aborts:
>
> ERROR: bad settings in read-only bindings file /etc/multipath/bindings
> fatal configuration error, aborting
>
> This affects the first "multipath -B" on any system without a bindings
> file, such as an installer environment.
>
> The wwids and prkeys code paths seek before every access and are
> unaffected.
>
> Fixes: 7eaeb33ae9f7 ("multipathd: watch bindings file with inotify + timestamp")
> Signed-off-by: Alex Brett <alex.brett@citrix.com>
> Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
next prev parent reply other threads:[~2026-11-06 20:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 15:24 [PATCH] libmultipath: open_file: rewind after writing the header Alex Brett
2026-11-06 20:06 ` Benjamin Marzinski [this message]
2026-11-06 21:14 ` Martin Wilck
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=au4zPAAiuq-yQpYQ@redhat.com \
--to=bmarzins@redhat.com \
--cc=alex.brett@citrix.com \
--cc=dm-devel@lists.linux.dev \
--cc=mwilck@suse.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 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.