All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.ru>
To: Gene Czarcinski <gene@czarc.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs-progs: Exit if not running as root
Date: Fri, 25 Jan 2013 19:00:12 +0600	[thread overview]
Message-ID: <20130125190012.3672dae6@natsu> (raw)
In-Reply-To: <51027AB8.6030901@czarc.net>

[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]

On Fri, 25 Jan 2013 07:29:44 -0500
Gene Czarcinski <gene@czarc.net> wrote:

> After all, I do not need to be root to execute "btrfs --version".

Is that all that comes to mind? I just did

$ dd if=/dev/zero of=fs.img bs=1M count=2048
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 3.76772 s, 570 MB/s

$ /sbin/mkfs.btrfs fs.img

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label (null) on fs.img
	nodesize 4096 leafsize 4096 sectorsize 4096 size 2.00GB
Btrfs Btrfs v0.19

$ /sbin/btrfsck fs.img 
checking extents
checking fs roots
checking root refs
found 28672 bytes used err is 0
total csum bytes: 0
total tree bytes: 28672
total fs tree bytes: 8192
btree space waste bytes: 23875
file data blocks allocated: 0
 referenced 0
Btrfs Btrfs v0.19

etc, etc.

And after that I could start a QEMU VM or an UserModeLinux kernel image,
passing this fs.img to it as a block device -- all while still being a regular
user, without needing root privileges.

-- 
With respect,
Roman

~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Stallman had a printer,
with code he could not see.
So he began to tinker,
and set the software free."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2013-01-25 13:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 11:32 [PATCH] Btrfs-progs: Exit if not running as root Gene Czarcinski
2013-01-25 11:41 ` Stefan Behrens
2013-01-25 12:03   ` Gene Czarcinski
2013-01-25 12:17     ` Stefan Behrens
2013-01-25 13:22       ` Gene Czarcinski
2013-01-25 11:55 ` Roman Mamedov
2013-01-25 12:29   ` Gene Czarcinski
2013-01-25 12:43     ` Hugo Mills
2013-01-25 15:19       ` Brendan Hide
2013-01-25 13:00     ` Roman Mamedov [this message]
2013-01-25 13:52   ` Russell Coker
2013-01-25 15:04 ` Gene Czarcinski
2013-01-25 15:10   ` Gene Czarcinski
2013-01-25 15:30   ` cwillu
2013-01-25 16:06   ` Eric Sandeen
2013-01-26  2:18   ` Russell Coker
2013-01-26  7:46     ` Goffredo Baroncelli
2013-01-25 15:07 ` Eric Sandeen

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=20130125190012.3672dae6@natsu \
    --to=rm@romanrm.ru \
    --cc=gene@czarc.net \
    --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.