From: Mark Fasheh mfas...@suse.com
This patch turns on the BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF superblock flag
when creating a new file system in mkfs, enabling extended inode refs.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
mkfs.c | 13 -
1 files changed, 8 insertions(+), 5
a second iterate function for extended refs, I fixed up
iterate_irefs_t arguments to take the raw information from whatever ref
version we're coming from. This removed a bunch of duplicated code.
- I am actually including a patch to btrfs-progs with this drop. :)
From: Mark Fasheh mfas...@suse.com
From: Mark Fasheh mfas...@suse.com
The iterate_irefs in backref.c is used to build path components from inode
refs. This patch adds code to iterate extended refs as well.
I had modify the callback function signature to abstract out some of the
differences between ref structures. iref_to_path
From: Mark Fasheh mfas...@suse.com
Teach tree-log.c about extended inode refs. In particular, we have to adjust
the behavior of inode ref replay as well as log tree recovery to account for
the existence of extended refs.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/backref.c | 68
.
Yep.
Thanks Jan!
--Mark
--
Mark Fasheh
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Apr 12, 2012 at 03:08:35PM +0200, Jan Schmidt wrote:
On 05.04.2012 22:09, Mark Fasheh wrote:
Teach tree-log.c about extended inode refs. In particular, we have to adjust
the behavior of inode ref replay as well as log tree recovery to account for
the existence of extended refs
On Thu, Apr 12, 2012 at 05:53:15PM +0200, Jan Schmidt wrote:
Hi Mark,
While reading 3/3 I stumbled across one more thing in this one:
On 05.04.2012 22:09, Mark Fasheh wrote:
+int btrfs_find_one_extref(struct btrfs_root *root, u64 inode_objectid,
+ u64 start_off
Schmidt list.bt...@jan-o-sch.net
Thanks again Jan. I'll be sure to CC you on my next drop!
--Mark
--
Mark Fasheh
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
--
Mark Fasheh
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
This patch adds basic support for extended inode refs. This includes support
for link and unlink of the refs, which basically gets us support for rename
as well.
Inode creation does not need changing - extended refs are only added after
the ref array is full.
Signed-off-by: Mark Fasheh mfas
Teach tree-log.c about extended inode refs. In particular, we have to adjust
the behavior of inode ref replay as well as log tree recovery to account for
the existence of extended refs.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/tree-log.c | 320
differences in the two disk structures.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/backref.c | 200 ++--
fs/btrfs/backref.h |4 +-
2 files changed, 165 insertions(+), 39 deletions(-)
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
generic_write_sync(file, pos, len), and that would be completely
transparent to userspace.
We should do it per FS though, I'll patch up btrfs.
I agree about doing it per FS. Ocfs2 just needs a one-liner to mark the
journal transaction as synchronous.
--Mark
--
Mark Fasheh
--
To unsubscribe
On Wed, Nov 16, 2011 at 11:35:40AM -0800, Mark Fasheh wrote:
We should do it per FS though, I'll patch up btrfs.
I agree about doing it per FS. Ocfs2 just needs a one-liner to mark the
journal transaction as synchronous.
Joel, here's an (untested) patch to fix this in Ocfs2.
--Mark
greater degree than just allowing an optional deref of
whatever structure btrfs (and similar file systems) have to point to the
right block device. Is this really the way we would like to proceed? Chris,
maybe you can chime in here?
--Mark
On Thu, May 19, 2011 at 01:18:26PM -0700, Mark Fasheh
of bubbling errors up the stack. The patches were
tested using some simple file system commands and a background kernel build.
Please review, all constructive feedback is appreciated :)
Thanks,
--Mark
--
Mark Fasheh
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body
From: Mark Fasheh mfas...@suse.com
This is called from only one place - create_subvol() which passes errors
safely back out to it's caller, btrfs_mksubvol where they are handled.
Additionally, btrfs_create_subvol_root() itself bug's needlessly from error
return of btrfs_update_inode(). Since
From: Mark Fasheh mfas...@suse.com
insert_ptr() always returns zero, so all the exta error handling can go
away. This makes it trivial to also make copy_for_split() a void function
as it's only return was from insert_ptr(). Finally, this all makes the
BUG_ON(ret) in split_leaf() meaningless so I
From: Mark Fasheh mfas...@suse.com
The only caller of update_ref_for_cow() is __btrfs_cow_block() which was
originally ignoring any return values. update_ref_for_cow() however doesn't
look like a candidate to become a void function - there are a few places
where errors can occur.
So instead I
...@jp.fujitsu.com
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/inode.c | 12 ++--
fs/btrfs/ioctl.c | 11 +--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 15fceef..5fdb700 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs
From: Mark Fasheh mfas...@suse.com
Since fixup_low_keys() has been made void, del_ptr() always returns zero. We
can then make it void as well. This allows us in turn to make
btrfs_del_leaf() void as the only return value it was previously catching
was from del_ptr(). This winds up removing
From: Mark Fasheh mfas...@suse.com
In btrfs_add_root_ref() we BUG if an error is encountered during
REF/BACKREF insertion. This does not look like a logic error, thus the BUG
is not called for. However, I don't think there's a simple way to recover
from such an error at that point, so we mark
From: Mark Fasheh mfas...@suse.com
We BUG_ON a nonzero, non -EAGAIN ret from lock_delalloc_range(). As it turns
out there is no other possible return value that makes sense anyway. The
bare BUG_ON(ret) was a bit confusing and looked like something that needed
fixing. This patch documents
From: Mark Fasheh mfas...@suse.com
btrfs_get_parent() searches the btree for a ref to the current object. From
there it can compute the parent objectid from which it can return a dentry.
if the reference is not found in the tree however, we BUG(). I believe a
more appropriate response would
The only caller of btrfs_alloc_dev_extent() is __btrfs_alloc_chunk() which
already bugs on any error returned. We can remove the BUG_ON's in
btrfs_alloc_dev_extent() then since __btrfs_alloc_chunk() will catch them
anyway.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/volumes.c |4
btrfs_alloc_chunk() unconditionally BUGs on any error returned from
__finish_chunk_alloc() so there's no need for two BUG_ON lines. Remove the
one from __finish_chunk_alloc().
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/volumes.c |4 +++-
1 files changed, 3 insertions(+), 1
From: Mark Fasheh mfas...@suse.com
This is trivial as the function always returns success. We can remove 3
BUG_ON(ret) lines as a result.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/delayed-ref.c | 26 ++
1 files changed, 10 insertions(+), 16 deletions
We BUG_ON() error from add_extent_mapping(), but that error looks pretty
easy to bubble back up - as far as I can tell there have not been any
permanent modifications to fs state at that point.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/volumes.c |3 ++-
1 files changed, 2
From: Mark Fasheh mfas...@suse.com
add_delayed_tree_ref() unconditionally returns 0. This makes it trivial to
turn into a void function. This kills another BUG_ON().
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/delayed-ref.c | 16 +++-
1 files changed, 7 insertions
From: Mark Fasheh mfas...@suse.com
update_ref_for_cow() will BUG_ON() after it's call to
btrfs_lookup_extent_info() if no existing references are found. Since refs
are computed directly from disk, this should be treated as a corruption
instead of a logic error.
Signed-off-by: Mark Fasheh mfas
From: Mark Fasheh mfas...@suse.com
balace_level() seems to deal with missing tree nodes by BUG_ON(). Instead,
we can easily just set the file system readonly and bubble -EROFS back up
the stack.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/ctree.c | 13 +++--
1 files
From: Mark Fasheh mfas...@suse.com
__btrfs_cow_block(), the only caller of update_ref_for_cow() will BUG_ON()
any error return. Instead, we can go read-only fs as update_ref_for_cow()
manipulates disk data in a way which doesn't look like it's easily rolled
back.
Signed-off-by: Mark Fasheh mfas
From: Mark Fasheh mfas...@suse.com
This is trivial - fixup_low_keys always returns zero so we can make it void.
As a result, we can then make setup_items_for_insert() void too which lets
us cut out a couple of BUG_ON(ret) lines.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/ctree.c
From: Mark Fasheh mfas...@suse.com
This is very easy - we can just pass an error from btrfs_find_last_root()
back out to the callers - all of them have proper error handling.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/disk-io.c |3 ++-
1 files changed, 2 insertions(+), 1
From: Mark Fasheh mfas...@suse.com
All callers of __finish_chunk_alloc() BUG_ON() return value, so it's trivial
for us to always bubble up any errors caught in __finish_chunk_alloc() to be
caught there.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/volumes.c |7 ++-
1 files
Hi,
The following are assorted fixes to error handling from all parts of the
Btrfs code. Every patch in this series stands on it's own, with the
exception of the last patch which relies on the one before it (so patches 7
and 8 can be considered a pair). I also included in this series an
From: Mark Fasheh mfas...@suse.com
This is called from only one place - create_subvol() which passes errors
safely back out to it's caller, btrfs_mksubvol where they are handled.
Additionally, btrfs_create_subvol_root() itself bug's needlessly from error
return of btrfs_update_inode(). Since
From: Mark Fasheh mfas...@suse.com
The only caller of update_ref_for_cow() is __btrfs_cow_block() which was
originally ignoring any return values. update_ref_for_cow() however doesn't
look like a candidate to become a void function - there are a few places
where errors can occur.
So instead I
From: Mark Fasheh mfas...@suse.com
Unfortunately it isn't enough to just exit here - the kzalloc() happens in a
loop and the allocated items are added to a linked list whose head is passed
in from the caller.
To fix the BUG_ON() and also provide the semantic that the list passed in is
only
From: Mark Fasheh mfas...@suse.com
insert_ptr() always returns zero, so all the exta error handling can go
away. This makes it trivial to also make copy_for_split() a void function
as it's only return was from insert_ptr(). Finally, this all makes the
BUG_ON(ret) in split_leaf() meaningless so I
...@jp.fujitsu.com
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/inode.c | 12 ++--
fs/btrfs/ioctl.c | 11 +--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 7028c0c..9f3a85d 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs
From: Mark Fasheh mfas...@suse.com
This is trivial - fixup_low_keys always returns zero so we can make it void.
As a result, we can then make setup_items_for_insert() void too which lets
us cut out a couple of BUG_ON(ret) lines.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/ctree.c
From: Mark Fasheh mfas...@suse.com
All callers of __finish_chunk_alloc() BUG_ON() return value, so it's trivial
for us to always bubble up any errors caught in __finish_chunk_alloc() to be
caught there.
Signed-off-by: Mark Fasheh mfas...@suse.de
---
fs/btrfs/volumes.c |7 ++-
1 files
From: Mark Fasheh mfas...@suse.com
Since fixup_low_keys() has been made void, del_ptr() always returns zero. We
can then make it void as well. This allows us in turn to make
btrfs_del_leaf() void as the only return value it was previously catching
was from del_ptr(). This winds up removing
and verifying that when this hits (git clone seemed to exercise this), the
function throws the proper error. Unfortunately but predictably, we later
hit a BUG_ON(ret) type line that still hasn't been fixed up ;)
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/file-item.c | 15
insert_ptr() always returns zero, so all the exta error handling can go
away. This makes it trivial to also make copy_for_split() a void function
as it's only return was from insert_ptr(). Finally, this all makes the
BUG_ON(ret) in split_leaf() meaningless so I removed that.
Signed-off-by: Mark
pretty
high up the call path at this point.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/ioctl.c |8 +---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 7cf0133..fc9525f 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
errors we can bubble this one up too.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/inode.c |3 +--
fs/btrfs/ioctl.c |2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 15fceef..7028c0c 100644
--- a/fs/btrfs/inode.c
+++ b
On Fri, Jul 22, 2011 at 09:45:19AM +0900, Tsutomu Itoh wrote:
(2011/07/22 4:48), Mark Fasheh wrote:
In addition to properly handling allocation failure from btrfs_alloc_path, I
also fixed up the kzalloc error handling code immediately below it.
Signed-off-by: Mark Fasheh mfas...@suse.com
, extent_root, flags);
+ if (ret 0 ret != -ENOSPC)
+ return ret;
+
You need mutex_unlock() before return.
Of course... Here's an updated patch (git tree has also been updated).
Thanks,
--Mark
--
Mark Fasheh
From: Mark Fasheh mfas...@suse.com
[PATCH] btrfs: Don't
Changelog:
- Updated patch 6 after review from Tsutomu Itoh
Hi,
The following patches attempt to replace all the paths where we
BUG_ON the return value of btrfs_alloc_path with proper error handling. It's
pretty clear that these places aren't BUGing because of code error. To be
,
btrfs_lookup_csums_range, btrfs_csum_file_blocks, btrfs_mark_extent_written,
btrfs_inode_by_name, btrfs_new_inode, btrfs_symlink,
insert_reserved_file_extent, and run_delalloc_nocow
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/extent-tree.c | 12 +---
fs/btrfs/file-item.c |7 +--
fs
The two -process_func call sites in tree-log.c which were ignoring a return
code have also been updated to gracefully exit as well.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/tree-log.c | 12 +---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs
I moved the path allocation up a few lines to the top of the function so
that we couldn't get into the state where we've dropped delayed items and
the extent cache but fail due to -ENOMEM.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/inode.c |9 +
1 files changed, 5
In addition to properly handling allocation failure from btrfs_alloc_path, I
also fixed up the kzalloc error handling code immediately below it.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/extent-tree.c |8 ++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git
).
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/volumes.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 19450bc..530a2fc 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2061,8 +2061,10 @@ int
btrfs_iget() also needed an update so that errors from btrfs_locked_inode()
are caught and bubbled back up.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/inode.c | 22 +-
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs
btrfs_alloc_chunk()
which can now return -ENOMEM. Instead of setting space_info-full on any
error from btrfs_alloc_chunk() I catch and return every error value _except_
-ENOSPC. Thanks goes to Tsutomu Itoh for pointing that issue out.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/extent-tree.c
don't think so actually. It looks like in this case we might want to
bubble the error back up past do_chunk_alloc and leave space_info untouched.
Chris, does that seem reasonable?
--Mark
--
Mark Fasheh
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body
On Fri, Jul 15, 2011 at 12:04:46PM +0900, Tsutomu Itoh wrote:
(2011/07/15 7:15), Mark Fasheh wrote:
In addition to properly handling allocation failure from btrfs_alloc_path, I
also fixed up the kzalloc error handling code immediately below it.
Need not you correct the caller
,
btrfs_lookup_csums_range, btrfs_csum_file_blocks, btrfs_mark_extent_written,
btrfs_inode_by_name, btrfs_new_inode, btrfs_symlink,
insert_reserved_file_extent, and run_delalloc_nocow
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/extent-tree.c | 12 +---
fs/btrfs/file-item.c |7 +--
fs
On Thu, Jul 14, 2011 at 03:00:07PM -0700, Mark Fasheh wrote:
This patch fixes many callers of btrfs_alloc_path() which BUG_ON allocation
failure. All the sites that are fixed in this patch were checked by me to
be fairly trivial to fix because of at least one of two criteria:
Please ignore
Hi,
The following patches attempt to replace all the paths where we
BUG_ON the return value of btrfs_alloc_path with proper error handling. It's
pretty clear that these places aren't BUGing because of code error. To be
explicit, much of the code is doing something like this:
path
,
btrfs_lookup_csums_range, btrfs_csum_file_blocks, btrfs_mark_extent_written,
btrfs_inode_by_name, btrfs_new_inode, btrfs_symlink,
insert_reserved_file_extent, and run_delalloc_nocow
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/extent-tree.c | 12 +---
fs/btrfs/file-item.c |7 +--
fs
btrfs_iget() also needed an update so that errors from btrfs_locked_inode()
are caught and bubbled back up.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/inode.c | 22 +-
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs
In addition to properly handling allocation failure from btrfs_alloc_path, I
also fixed up the kzalloc error handling code immediately below it.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/extent-tree.c |8 ++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git
I also removed the BUG_ON from error return of find_next_chunk in
init_first_rw_device(). It turns out that the only caller of
init_first_rw_device() also BUGS on any nonzero return so no actual behavior
change has occurred here.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/volumes.c
The two -process_func call sites in tree-log.c which were ignoring a return
code have also been updated to gracefully exit as well.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/tree-log.c | 12 +---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs
I moved the path allocation up a few lines to the top of the function so
that we couldn't get into the state where we've dropped delayed items and
the extent cache but fail due to -ENOMEM.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/inode.c |9 +
1 files changed, 5
. In order to
maintain behavior I placed a BUG_ON clause there - at least though it's now
at a higher level in the code.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/ioctl.c |1 +
fs/btrfs/root-tree.c |6 --
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs
On Sat, May 14, 2011 at 08:06:04PM -0700, Eric W. Biederman wrote:
Mark Fasheh mfas...@suse.com writes:
This patch introduces a callback in the super_operations structure,
'get_maps_dev' which is then used by procfs to query which device to return
for reporting in /proc/[PID]/maps
This patch introduces a callback in the super_operations structure,
'get_maps_dev' which is then used by procfs to query which device to return
for reporting in /proc/[PID]/maps.
btrfs wants this so that it can return the same device as it uses from
stat(2) calls.
Signed-off-by: Mark Fasheh mfas
Use this to return the subvolume superblock in proc instead of the global
superblock which is automatically taken today. This fixes a userspace
breakage where discrepancies between the devices two would confuse software
such as lsof.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs
with a more recent kernel.
--Mark
--
Mark Fasheh
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
points, but link()
does not work across different mount points, even if the same file
system is mounted on both.)
This matters because an application may have different behaviors based on
return codes.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/inode.c |2 +-
1
the subvolumes device (via some callback I suppose)?
Another alternative of course is to return the true block device in
btrfs_getattr() but that has some obvious downsides too.
Thanks and best regards,
--Mark
--
Mark Fasheh
--
To unsubscribe from this list: send the line unsubscribe linux
This was quite trivial - there's only 3 places I counted where we weren't
handling errors. None of the sites looked like they needed any additional
unrolling either.
Signed-off-by: Mark Fasheh mfas...@suse.com
---
fs/btrfs/xattr.c |6 ++
1 files changed, 2 insertions(+), 4 deletions
401 - 477 of 477 matches
Mail list logo