linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@libero.it>
To: linux-btrfs@vger.kernel.org
Subject: [RFC] btrfs-progs: use the new ioctl BTRFS_IOC_GET_CHUNK_INFO
Date: Mon, 25 Sep 2017 22:18:13 +0200	[thread overview]
Message-ID: <20170925201815.10161-1-kreijack@libero.it> (raw)


Hi all,

this patches set uses the new ioctl BTRFS_IOC_GET_CHUNK_INFO to get
information about the chunk (see my other emails). 

The first patch change the function get_partition_size() to avoid
ioctl which would require root privileges (BLKGETSIZE64).
Instead it obtain the information via the sysfs filesystem.

The second patch use the BTRFS_IOC_GET_CHUNK_INFO instead of
TREE_SEARCH_IOCTL. The old code is still in place as fallback
when the kernel doesn't have the new ioctl.

These patches allow to use "btrfs fi usage" without root privileges.

Comments are welcome
BR
G.Baroncelli

--
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

             reply	other threads:[~2017-09-25 20:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 20:18 Goffredo Baroncelli [this message]
2017-09-25 20:18 ` [PATCH 1/2] get_partition_size() doens't require root privileges Goffredo Baroncelli
2017-09-25 20:18 ` [PATCH 2/2] Use the new ioctl BTRFS_IOC_GET_CHUNK_INFO for load_chunk_info() Goffredo Baroncelli
2020-03-15 15:24 [RFC] btrfs-progs: use the new ioctl BTRFS_IOC_GET_CHUNK_INFO Goffredo Baroncelli
2020-03-25 20:12 ` Goffredo Baroncelli
2020-03-31 19:17 ` Goffredo Baroncelli
2020-03-31 19:18 ` Goffredo Baroncelli

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=20170925201815.10161-1-kreijack@libero.it \
    --to=kreijack@libero.it \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).