All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 0/3] Use unaligned put/get
Date: Wed, 16 Sep 2020 19:25:11 +0200	[thread overview]
Message-ID: <cover.1600276853.git.dsterba@suse.com> (raw)

We use buffers that get mapped to structures and then accessed via
member pointers. For all the on-disk items we have the setget helpers,
but there are still some other cases like send and free space cache
(v1). Due to natural alignment this worked and we haven't received
reports where from strict alignment arches. Use the
put/get_unaligned_le* helpers to make it explicit.

David Sterba (3):
  btrfs: send: use helpers for unaligned access to header members
  btrfs: free-space-cache: use unaligned helpers to access data
  btrfs: use unaligned helpers for stack and header set/get helpers

 fs/btrfs/ctree.h            | 20 ++++++++++++++------
 fs/btrfs/free-space-cache.c | 21 +++++++++------------
 fs/btrfs/send.c             | 14 +++++++-------
 fs/btrfs/struct-funcs.c     | 10 ----------
 4 files changed, 30 insertions(+), 35 deletions(-)

-- 
2.25.0


             reply	other threads:[~2020-09-16 17:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 17:25 David Sterba [this message]
2020-09-16 17:25 ` [PATCH 1/3] btrfs: send: use helpers for unaligned access to header members David Sterba
2020-09-16 17:25 ` [PATCH 2/3] btrfs: free-space-cache: use unaligned helpers to access data David Sterba
2020-09-16 17:25 ` [PATCH 3/3] btrfs: use unaligned helpers for stack and header set/get helpers David Sterba

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=cover.1600276853.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@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 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.