Displaying 4 results from an estimated 4 matches for "log_remov".
Did you mean:
log_remove
2013 May 22
0
[PATCH 1/2] Btrfs: dont do log_removal in insert_new_root
As for splitting a leaf, root is just the leaf, and tree mod log does not apply
on leaf, so in this case, we don''t do log_removal.
As for splitting a node, the old root is kept as a normal node and we have nicely
put records in tree mod log for moving keys and items, so in this case we don''t do
that either.
As above, insert_new_root can get rid of log_removal.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
-...
2013 May 07
2
[PATCH] Btrfs: fix passing wrong arg gfp_t to decide the correct allocation mode
...679,7 @@ __tree_mod_log_free_eb(struct btrfs_fs_info *fs_info, struct extent_buffer *eb)
static noinline int
tree_mod_log_insert_root(struct btrfs_fs_info *fs_info,
struct extent_buffer *old_root,
- struct extent_buffer *new_root, gfp_t flags,
+ struct extent_buffer *new_root,
int log_removal)
{
struct tree_mod_elem *tm;
@@ -691,7 +691,7 @@ tree_mod_log_insert_root(struct btrfs_fs_info *fs_info,
if (log_removal)
__tree_mod_log_free_eb(fs_info, old_root);
- ret = tree_mod_alloc(fs_info, flags, &tm);
+ ret = tree_mod_alloc(fs_info, GFP_ATOMIC, &tm);
if (ret < 0)...
2010 Jul 14
1
ActiveRecord::Observer, update_all and has_many
Hi,
I''m using an ActiveRecord::Observer to log users changing data in my
application. However, I''ve noted that adding an item to a has_many
relationship gets logged, but removing the item does not. That is:
@product.users << user
is logged, but:
@product.users.delete(user)
is not.
I''ve dug into ActiveRecord and found that the underlying issue is that
the
2006 Jan 13
1
association callbacks
...write_inheritable_array(add_callback.to_sym, [:log_add])
#remove_callback
remove_callback = "before_remove_for_#{association.name}"
class_inheritable_reader(remove_callback.to_sym)
write_inheritable_array(remove_callback.to_sym, [:log_remove])
end
}
end
end#end ClassMethods
This works well and the only way I found to do this without:
1) Didn''t want to have to require code in the model. I wanted it to be
"smart".
2) Didn''t want to "alias_method" any Rails code. I thoug...