Displaying 20 results from an estimated 10000 matches similar to: "Sparse files and block devices"
2009 Nov 19
10
Unable to mount loopback devices in RAID mode
Hi!
I recently tried to mount a filesystem in RAID1 mode using loopback devices. I followed the instructions at [1]. Here''s exactly what I''ve done:
$ dd if=/dev/zero of=raid1_0.img bs=1M count=500
$ dd if=/dev/zero of=raid1_1.img bs=1M count=500
$ mkfs.btrfs -m raid1 -d raid1 raid1_0.img raid1_1.img
$ losetup /dev/loop0 raid1_0.img
$ losetup /dev/loop1 raid1_1.img
$ mount -t
2013 Feb 12
10
[PATCH] Btrfs-progs: check out if the swap device
Currently, the following commands succeed.
# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda3 partition 8388604 0 -1
/dev/sdc8 partition 9765884 0 -2
# mkfs.btrfs /dev/sdc8
WARNING! - Btrfs v0.20-rc1-165-g82ac345 IS EXPERIMENTAL
WARNING! - see
2013 Dec 13
2
[PATCH] Btrfs: fix error check of btrfs_lookup_dentry()
Clean up btrfs_lookup_dentry() to never return NULL, but PTR_ERR(-ENOENT)
instead. This keeps the return value convention consistent.
Callers who use btrfs_lookup_dentry() require a trivial update.
create_snapshot() in particular looks like it can also lose a BUG_ON(!inode)
which is not really needed - there seems less harm in returning ENOENT to
userspace at that point in the stack than there
2010 Dec 16
2
[BUG?] There is a possibility that 'i_ino' overflows
Hi,
In btrfs, inode number is increased each time a new file or directory
is made.
Therefore, if the making deletion of the file is repeated, value of
''i_ino'' increases rapidly.
For example, inode number changes as follows.
$ touch foo
$ ls -i foo
266 foo
$ rm foo
$ touch bar
$ ls -i bar
267 bar
$
And then, length of ''i_ino'' and
2011 Jul 12
1
after mounting with -o degraded: ioctl: LOOP_CLR_FD: Device or resource busy
dd if=/dev/null of=img5 bs=1 seek=2G
dd if=/dev/null of=img6 bs=1 seek=2G
mkfs.btrfs -d raid1 -m raid1 img5 img6
losetup /dev/loop4 img5
losetup /dev/loop5 img6
btrfs device scan
mount -t btrfs /dev/loop4 dir
umount dir
losetup -d /dev/loop5
mount -t btrfs -o degraded /dev/loop4 dir
umount dir
losetup -d /dev/loop4
ioctl: LOOP_CLR_FD: Device or resource busy
mkfs.ext3 /dev/loop4
mke2fs 1.39
2011 Aug 14
3
cant mount degraded (it worked in kernel 2.6.38.8)
# uname -a
Linux dhcppc1 3.0.1-xxxx-std-ipv6-64 #1 SMP Sun Aug 14 17:06:21 CEST
2011 x86_64 x86_64 x86_64 GNU/Linux
mkdir test5
cd test5
dd if=/dev/null of=img5 bs=1 seek=2G
dd if=/dev/null of=img6 bs=1 seek=2G
losetup /dev/loop2 img5
losetup /dev/loop3 img6
mkfs.btrfs -d raid1 -m raid1 /dev/loop2 /dev/loop3
btrfs device scan
btrfs filesystem show
Label: none uuid:
2013 Oct 21
11
swapfile on btrfs, temporary solution for wiki
Hello list, i know what btrfs don''t support swap files.
I read arch wiki and when i reading about systemd addon for auto
create swapfile on btrfs, i invent the way, how create and using swap
file, just see following sh code:
swapfile=$(losetup -f) #free loop device
truncate -s 8G /swap #create 8G sparse swap file
losetup $swapfile /swap #mount file to loop
mkswap $swapfile
swapon
2011 Jan 22
32
Bug in mkfs.btrfs?!
Hi,
I wanted to create a new btrfs fs for my backups.
When trying to mkfs.btrfs for that device, I''m getting
"error checking /dev/loop2 mount status"
With strace I see where the problem is:
lstat("/dev/disk/by-id/ata-INTEL_SSDSA2M160G2GC_CVPO939201JX160AGN-par",
0x7fffa30b3cf0) = -1 ENOENT (No such file or directory)
The problem is there is something missing
2011 Feb 12
3
[PATCH] fix uncheck memory allocations
To make Btrfs code more robust, several return value checks where memory
allocation can fail are introduced. I use BUG_ON where I don''t know how
to handle the error properly, which increases the number of using the
notorious BUG_ON, though.
Signed-off-by: Yoshinori Sano <yoshinori.sano@gmail.com>
---
fs/btrfs/compression.c | 6 ++++++
fs/btrfs/extent-tree.c | 2 ++
2011 Jun 08
1
[PATCH] Btrfs: use join_transaction in btrfs_evict_inode()
The WARN_ON() in start_transaction() was triggered while balancing.
The cause is btrfs_relocate_chunk() started a transaction and
then called iput() on the inode that stores free space cache,
and iput() called btrfs_start_transaction() again.
Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
fs/btrfs/inode.c | 2 +-
1 files
2013 Sep 05
9
btrfs-convert won't convert ext* - No valid Btrfs found on /dev/sdb1
Hello guys, i try to convert ext4 volume, but btrfs-convert show me error:
"No valid Btrfs found on file
unable to open ctree
conversion aborted."
Ubuntu 13.04
Kernel: 3.11
btrfs-progs git version 0.20-git20130822~194aa4a13
way to reproduce error:
$ truncate -s 4G file
$ mkfs.ext4 file #say yes to create fs on non block device.
$ btrfs-convert file
No valid Btrfs found on file
unable
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
When btrfs_start_transaction() fails, we should call btrfs_std_error()
properly for filesystem to readonly.
(in this patch, forced readonly framework is used)
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
---
fs/btrfs/file.c | 1 +
fs/btrfs/inode.c | 34 +++++++++++++++++++++++++++-------
fs/btrfs/ioctl.c | 11 ++++++++++-
fs/btrfs/relocation.c | 4 +++-
2011 Feb 15
1
[PATCH] Btrfs: fix uncheck memory allocations
To make Btrfs code more robust, several return value checks where memory
allocation can fail are introduced. I use BUG_ON where I don''t know how
to handle the error properly, which increases the number of using the
notorious BUG_ON, though.
Signed-off-by: Yoshinori Sano <yoshinori.sano@gmail.com>
---
fs/btrfs/compression.c | 6 ++++++
fs/btrfs/extent-tree.c | 4 ++++
2009 Jun 15
1
Mounting multiple regular files as a filesystem
I''m trying to create a multi-device filesystem on top of regular files
(not actual disks), and mount that to a loopback device. For a
filesystem created on a single file, it works fine, but for a filesystem
across multiple files, it doesn''t.
dd if=/dev/zero of=img1 bs=4096 count=65536
dd if=/dev/zero of=img2 bs=4096 count=65536
dd if=/dev/zero of=img3 bs=4096 count=65536
dd
2011 Apr 09
16
wrong values in "df" and "btrfs filesystem df"
Hallo, linux-btrfs,
First I create an array of 2 disks with
mkfs.btrfs -d raid0 -m raid1 /dev/sdb1 /dev/sdd1
and mount it at /srv/MM.
Then I fill it with about 1,6 TByte.
And then I add /dev/sde1 via
btrfs device add /dev/sde1 /srv/MM
btrfs filesystem balance /srv/MM
(it run about 20 hours)
Then I work on it, copy some new files, delete some old files - all
works well. Only
df
2010 Dec 01
2
[RFC PATCH 4/4 v2] Btrfs: deal with filesystem state at mount, umount
Since there is a filesystem state, we should deal with it carefully at mount,
umount and remount.
- At mount, the FS state should be checked if there is error on these FS.
If it does have, btrfsck is recommended.
- At umount, the FS state should be saved into disk for consistency.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
---
fs/btrfs/disk-io.c | 47
2013 Jan 07
3
[PATCH] btrfs: add "no file data" flag to btrfs send ioctl
This patch adds the flag, BTRFS_SEND_FLAG_NO_FILE_DATA to the btrfs send
ioctl code. When this flag is set, the btrfs send code will never write file
data into the stream (thus also avoiding expensive reads of that data in the
first place). BTRFS_SEND_C_UPDATE_EXTENT commands will be sent (instead of
BTRFS_SEND_C_WRITE) with an offset, length pair indicating the extent in
question.
This patch
2009 Nov 18
1
To loop or not to loop with btrfs
Hi,
This left me puzzled for a while:
22:29 borg:/ # losetup /dev/loop1 /.B.disk
22:29 borg:/ # mount /dev/loop1 /B
mount: /dev/loop1: can''t read superblock
22:29 borg:/ # blkid /dev/loop1
/dev/loop1: UUID="e19fe89b-cde3-4ccc-bc70-b759a57bd1c9"
UUID_SUB="f29c6218-d040-4546-a227-4dd2d2142817" TYPE="btrfs"
22:29 borg:/ # losetup -d /dev/loop1
22:29 borg:/ #
2012 Nov 23
14
extended attributes wiredness
Hi,
I am using kernel 3.7-rc6.
I have written a test application for extended attributes and have for
some folders a wired behaviour:
#include <stdio.h>
#include <string.h>
#include <attr/xattr.h>
char attrs[1024];
ssize_t attrslen;
int i;
char value[1024];
ssize_t valuelen;
int main(int argc, char *argv[])
{
if (argc != 2)
{
fprintf(stderr, "Syntax: testxattr
2013 Jul 01
1
[PATCH v2] xfstests: btrfs/316: cross-subvolume sparse copy
This testscript creates reflinks to files on different subvolumes,
overwrites the original files and reflinks, and moves reflinked files
between subvolumes.
Originally submitted as testcase 302, changes are made based on comments
from Eric: http://oss.sgi.com/archives/xfs/2013-03/msg00231.html
Two new common/rc functions used in this script (_require_cp_reflink and
_verify_reflink) have been