On Wed, Jul 22, 2015 at 10:45 AM, Davide Italiano wrote:
> On Fri, Jun 26, 2015 at 7:08 AM, David Sterba wrote:
>> On Mon, Apr 06, 2015 at 10:09:15PM -0700, Davide Italiano wrote:
>>> - We call inode_size_ok() only if FL_KEEP_SIZE isn't specified.
>>> - As an opti
On Fri, Jun 26, 2015 at 7:08 AM, David Sterba wrote:
> On Mon, Apr 06, 2015 at 10:09:15PM -0700, Davide Italiano wrote:
>> - We call inode_size_ok() only if FL_KEEP_SIZE isn't specified.
>> - As an optimisation we can skip the call if (off + len)
>> isn't great
On Mon, Jun 29, 2015 at 4:59 AM, Filipe David Manana wrote:
> On Sun, Jun 28, 2015 at 10:47 PM, Davide C. C. Italiano
> wrote:
>> From: Davide Italiano
>>
>> btrfs_insert_inode_ref() may fail and we want to make sure
>> the transaction is aborted before calling btr
On Mon, Apr 20, 2015 at 1:49 PM, Davide Italiano wrote:
> On Mon, Apr 6, 2015 at 10:09 PM, Davide Italiano
> wrote:
>> - We call inode_size_ok() only if FL_KEEP_SIZE isn't specified.
>> - As an optimisation we can skip the call if (off + len)
>> isn't greater
On Mon, Apr 6, 2015 at 10:09 PM, Davide Italiano wrote:
> - We call inode_size_ok() only if FL_KEEP_SIZE isn't specified.
> - As an optimisation we can skip the call if (off + len)
> isn't greater than the current size of the file. This operation
> is called under the lo
to it the correct value rather
than a more conservative estimation.
Signed-off-by: Davide Italiano
---
fs/btrfs/file.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 30982bb..f649bfc 100644
--- a/fs/btrfs/file.c
+++ b/fs/bt
This matches the logic of ext4. I think it's more
correct passing (offset + len) to inode_newsize_ok()
rather than rounding up to block size.
The call can be skipped in some cases too. It works for
me but I'm new to this code so I might miss something.
Let me know what you think.
David
Signed-off-by: Davide Italiano
---
fs/btrfs/inode.c | 190 ++-
1 file changed, 189 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index d2e732d..49b0867 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
This is an attempt to implement RENAME_EXCHANGE in btrfs.
It survived basic testing and I think it's ready for others' feedback.
I'll stress test {and, or} rewrite it depending on people's comments.
Davide Italiano (1):
Btrfs: RENAME_EXCHANGE semantic for renameat2()
fs