Signed-off-by: Jie Liu
---
fs/btrfs/ioctl.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 4a34c47..795c415 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1689,9 +1689,9 @@ err:
static noinline int btrfs_ioctl_tr
For an initial dir inode, stat(1) show it links as 1, IMHO it should be
2 by default.
Signed-off-by: Jie Liu
---
fs/btrfs/inode.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 116ab67..92b3cb9 100644
--- a/fs/btrfs/inode.c
+++
Please ignore this patch for now, it can cause the file system corrupted
and failed to mount again, sorry for the noise!
-Jeff
On 11/28/2011 03:47 PM, Jeff Liu wrote:
> For an initial dir inode, stat(1) show it links as 1, IMHO it should be
> 2 by default.
>
> Signed-off
On 11/29/2011 11:48 PM, Chris Mason wrote:
> On Tue, Nov 29, 2011 at 02:04:37PM +0800, Jeff Liu wrote:
>> Please ignore this patch for now, it can cause the file system corrupted
>> and failed to mount again, sorry for the noise!
>
> Directories always have a link count
By referring to http://linux.die.net/man/2/lseek, return ENXIO only
when "offset beyond EOF" for either SEEK_DATA or SEEK_HOLE inquiry.
But we return it in case of internal issue too if btrfs_get_extent_fiemap()
failed
due to other issues. This will confuse the user applications to be expecting
On 02/09/2012 11:46 AM, Jeff Liu wrote:
> By referring to http://linux.die.net/man/2/lseek, return ENXIO only
> when "offset beyond EOF" for either SEEK_DATA or SEEK_HOLE inquiry.
> But we return it in case of internal issue too if btrfs_get_extent_fiemap()
> failed
> d
On 02/09/2012 12:51 PM, Dave Chinner wrote:
> On Thu, Feb 09, 2012 at 12:08:47PM +0800, Jeff Liu wrote:
>> On 02/09/2012 11:46 AM, Jeff Liu wrote:
>>
>>> By referring to http://linux.die.net/man/2/lseek, return ENXIO only
>>> when "offset beyond EOF"
Given that ENXIO only means "offset beyond EOF" for either SEEK_DATA or
SEEK_HOLE inquiry
in a desired file range, so we should return the internal error unchanged if
btrfs_get_extent_fiemap()
call failed, rather than ENXIO.
Cc: Dave Chinner
Signed-off-by: Jie Liu
---
fs/btrfs/file.c |4
From: Jie Liu
Fix the code comments for lzo compression workspace.
The buf item is used to store the decompressed data
and cbuf is used to store the compressed data.
Signed-off-by: Jie Liu
---
fs/btrfs/lzo.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/lz
From: Jie Liu
Create a small file and fallocate it to a big size with
FALLOC_FL_KEEP_SIZE option, then truncate it back to the
small size again, the disk free space is not changed back
in this case. i.e,
# dd if=/dev/zero of=/mnt/test bs=512 count=1
# ls -l /mnt
total 4
-rw-r--r-- 1 root root 51
On 06/28/2013 08:41 PM, Josef Bacik wrote:
> On Fri, Jun 28, 2013 at 01:15:52PM +0800, Jeff Liu wrote:
>> From: Jie Liu
>>
>> Create a small file and fallocate it to a big size with
>> FALLOC_FL_KEEP_SIZE option, then truncate it back to the
>> small size
On 06/29/2013 10:22 AM, Dave Chinner wrote:
> On Fri, Jun 28, 2013 at 08:41:00AM -0400, Josef Bacik wrote:
>> On Fri, Jun 28, 2013 at 01:15:52PM +0800, Jeff Liu wrote:
>>> From: Jie Liu
>>>
>>> Create a small file and fallocate it to a big size with
>>&
On 07/30/2013 02:55 AM, Josef Bacik wrote:
> So df in btrfs is tricky at best, and relying on it for accurate information
> is
> not great, but it's the best way to verify this test. To get around btrfs
> being
> inconsistent sometimes just use _within_tolerance to check our new df value to
> m
On 07/01/2012 05:49 PM, Zhi Yong Wu wrote:
> On Sun, Jul 1, 2012 at 5:41 PM, Mike Fleetwood
> wrote:
>> On 1 July 2012 05:53, Zhi Yong Wu wrote:
>>> HI,
>>>
>>> Do anyone know where btrfs_print_tree is invoked? thanks.
>>>
>>> --
>>> Regards,
>>>
>>> Zhi Yong Wu
>>
>> Is this the answer you are
Hello,
I've done a prototype implementation of snapshot diff utility many months ago.
It was originally meant to analyze the differences between two snapshots which
are
inherited from the same subvolume/snapshot.
Moreover, the upstream LXC userland tools has been released with a dedicated
templ
Make ino_resolve() shared so that we can call it at snapshot diff module.
Signed-off-by: Jie Liu
---
btrfs-list.c |3 +--
btrfs-list.h | 22 ++
2 files changed, 23 insertions(+), 2 deletions(-)
create mode 100644 btrfs-list.h
diff --git a/btrfs-list.c b/btrfs-list.
Maybe it's better to put those #defines to the source file of snapshot diff as
no other modules
need them.
Signed-off-by: Jie Liu
---
diff-snapshot.h | 47 +++
1 files changed, 47 insertions(+), 0 deletions(-)
create mode 100644 diff-snapshot.h
d
Now the source file is coming.
Signed-off-by: Jie Liu
---
diff-snapshot.c | 1026 +++
1 files changed, 1026 insertions(+), 0 deletions(-)
create mode 100644 diff-snapshot.c
diff --git a/diff-snapshot.c b/diff-snapshot.c
new file mode 100644
Signed-off-by: Jie Liu
---
Makefile |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 969..f8b517d 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ CFLAGS = -g -O0
objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
make this feature works as `btrfs subvolume diff-snapshot [options]
`.
Signed-off-by: Jie Liu
---
cmds-subvolume.c | 90 ++
1 files changed, 90 insertions(+), 0 deletions(-)
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 3508ce6.
ke end user's life easier, that would be fine.
Thanks,
-Jeff
> Apologies if I somehow misunderstood what your snapshot-diff code does.
>
> Thanks,
> Alex.
>
>
> On Tue, Aug 7, 2012 at 11:56 AM, Jeff Liu wrote:
>> Hello,
>>
>> I've done a prototype
Remove an invalid size check up from btrfs_shrink_dev().
The new size should not larger than the device->total_bytes as it was
already verified before coming to here(i.e. new_size < old_size).
Remove invalid check up for btrfs_shrink_dev().
Signed-off-by: Jie Liu
---
fs/btrfs/ioctl.c |2
On 10/31/2012 08:40 AM, Liu Bo wrote:
> On 10/30/2012 11:20 PM, Gábor Nyers wrote:
>> Hi,
>>
>> How could one find out if 2 files share any extents on a btrfs file system?
>>
>> A more generic variation of the above: How to list files on the same
>> file system/subvolume sharing content?
One idea i
On 10/31/2012 07:31 PM, David Sterba wrote:
> On Wed, Oct 31, 2012 at 10:30:22AM +0800, Jeff Liu wrote:
>> One idea is to mark those cloned extents as FIEMAP_EXTENT_SHARED so that
>> we can go through a file to figure out how many extents are shared
>> through fiemap(2), a
On 11/06/2012 06:45 AM, David Sterba wrote:
> On Wed, Oct 31, 2012 at 09:02:15PM +0800, Jeff Liu wrote:
>> I propose this because OCFS2 report shared space in this way combine with
>> du(1).
>>
>> An old patch set to teach du(1) aware of reflinked file:
>> https
Introduce a new ioctl BTRFS_IOC_GET_FSLABEL, which would be used to fetch the
label
of a mounted filesystem.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
fs/btrfs/ioctl.c | 14 ++
fs/btrfs/ioctl.h |2 ++
2 files changed, 16 insertions(+)
diff --git a/fs/btrfs/ioctl.
Add a new ioctl BTRFS_FS_SETLABEL to change the label of a mounted filesystem.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
fs/btrfs/ioctl.c | 14 ++
fs/btrfs/ioctl.h |2 ++
2 files changed, 16 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 8fcf
Hello,
This is an improved tiny patch set to add get/set the label upon a mounted
file system via ioctl(2).
I'd like to add the Signed-off-by with Anand for the credit since He has posted
a
similar patch set a few month ago.
Changes of V4->V3:
- Add a new ioctl to fetch the label of a mounted
Fix the command usage of "btrfs filesystem label" to reflect this change. i.e.
so that
we can get/set the label of a mounted filesystem against the mountpoint.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
cmds-filesystem.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Get the label of a mounted filesystem through the new ioctl
BTRFS_IOCTL_FS_GETLABEL.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
btrfslabel.c | 68 +-
ioctl.h |2 ++
utils.c |2 +-
utils.h |1 +
4 fi
Change the label of a mounted file system through the new ioctl
BTRFS_IOCTL_FS_SETLABEL.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
btrfslabel.c | 84 ++
ioctl.h |2 ++
2 files changed, 51 insertions(+), 35 deletions
Hi Miao,
On 12/12/2012 11:03 AM, Miao Xie wrote:
> Hi, Liu
>
> On wed, 12 Dec 2012 08:22:28 +0800, Jeff Liu wrote:
>> Add a new ioctl BTRFS_FS_SETLABEL to change the label of a mounted
>> filesystem.
>>
>> Signed-off-by: Jie Liu
>> Signed-off-by: Ana
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
fs/btrfs/ioctl.c | 14 ++
fs/btrfs/ioctl.h |2 ++
2 files changed, 16 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 8fcf9a5..b0a5e17 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3699,6 +36
Add a new ioctl BTRFS_FS_SETLABEL to change the label of a mounted filesystem.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
fs/btrfs/ioctl.c | 34 ++
fs/btrfs/ioctl.h |2 ++
2 files changed, 36 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btr
On 12/12/2012 11:50 AM, Miao Xie wrote:
> On Wed, 12 Dec 2012 11:22:49 +0800, Jeff Liu wrote:
>> Signed-off-by: Jie Liu
>> Signed-off-by: Anand Jain
>>
>> ---
>> fs/btrfs/ioctl.c | 14 ++
>> fs/btrfs/ioctl.h |2 ++
>> 2 files ch
Sorry for my late response, I missed your feedback somehow.
On 12/12/2012 12:15 PM, Miao Xie wrote:
> On wed, 12 Dec 2012 11:23:00 +0800, Jeff Liu wrote:
>> Add a new ioctl BTRFS_FS_SETLABEL to change the label of a mounted
>> filesystem.
>>
>>
>> Signed-off-by:
Hello,
This patch set is trying to make Btrfs support get/set label for a mounted file
sytem via ioctl(2).
There are a couple of changes according to Miao's comments which were shown as
following.
Changes of V5->V4 in kernel:
- Revise the ioctl number of BTRFS_IOC_GET_FSLABEL/BTRFS_IOC_SET_FSLA
Introduce a new ioctl BTRFS_IOC_SET_FSLABEL to change the label of a mounted
file system.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
Cc: Miao Xie
---
fs/btrfs/ioctl.c | 40
fs/btrfs/ioctl.h |2 ++
2 files changed, 42 insertions(+)
diff --
Introduce a new ioctl BTRFS_IOC_GET_FSLABEL to fetch the label of a mounted
file system.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
Cc: Miao Xie
---
fs/btrfs/ioctl.c | 15 +++
fs/btrfs/ioctl.h |2 ++
2 files changed, 17 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/f
With this new ioctl(2), we can get the label for a mounted file system.
It still does normal process to fetch label if the specified file system is
unmounted.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
btrfslabel.c | 74 ++
With this new ioctl(2), we can set/change the label for a mounted file system.
It still does normal process for an umounted file system.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
btrfslabel.c | 90 +++---
ioctl.h |2 ++
Currently, we keeping silent if the label length is exceeding BTRFS_LABEL_SIZE
- 1, and just
truncating the characters beyond that.
This patch make it return error and exit in this situation.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
btrfslabel.c | 10 --
1 file changed,
Fix the command usage of "btrfs filesystem label" to reflect this change. i.e.
so that
we can get/set the label of a mounted filesystem against the mountpoint.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
---
cmds-filesystem.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
On 12/17/2012 07:57 PM, Miao Xie wrote:
> Onmon, 17 Dec 2012 19:22:11 +0800, Jeff Liu wrote:
>> Introduce a new ioctl BTRFS_IOC_SET_FSLABEL to change the label of a mounted
>> file system.
>>
>> Signed-off-by: Jie Liu
>> Signed-off-by: Anand Jain
>&g
On 12/18/2012 01:34 AM, Goffredo Baroncelli wrote:
> On 12/17/2012 02:30 PM, Jeff Liu wrote:
>> On 12/17/2012 07:57 PM, Miao Xie wrote:
>>> On mon, 17 Dec 2012 19:22:11 +0800, Jeff Liu wrote:
>>>> Introduce a new ioctl BTRFS_IOC_SET_FSLABEL to change the label
On 12/18/2012 10:21 AM, Miao Xie wrote:
> Onmon, 17 Dec 2012 18:34:41 +0100, Goffredo Baroncelli wrote:
>> On 12/17/2012 02:30 PM, Jeff Liu wrote:
>>> On 12/17/2012 07:57 PM, Miao Xie wrote:
>>>> On mon, 17 Dec 2012 19:22:11 +0800, Jeff Liu wrot
On 12/18/2012 10:33 AM, Jeff Liu wrote:
> On 12/18/2012 10:21 AM, Miao Xie wrote:
>> On mon, 17 Dec 2012 18:34:41 +0100, Goffredo Baroncelli wrote:
>>> On 12/17/2012 02:30 PM, Jeff Liu wrote:
>>>> On 12/17/2012 07:57 PM, Miao Xie wrote:
>>>>> On
Hello,
Here is quick fix for btrfs set lable ioctl(2) based on v5, it does label
length check up with
strnlen() to avoid searching a zero could go beyond the page limit touching an
un-mapped page
and raising an segmentation fault with strlen().
V6->v5:
- Improve the input label string validati
Introduce a new ioctl BTRFS_IOC_GET_FSLABEL to fetch the label of a mounted
file system.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
Reviewed-by: Miao Xie
---
fs/btrfs/ioctl.c | 15 +++
fs/btrfs/ioctl.h |2 ++
2 files changed, 17 insertions(+)
diff --git a/fs/btrfs/io
Introduce a new ioctl BTRFS_IOC_SET_FSLABEL to change the label of a mounted
file system.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
Cc: Miao Xie
Cc: Goffredo Baroncelli
---
fs/btrfs/ioctl.c | 39 +++
fs/btrfs/ioctl.h |2 ++
2 files changed, 4
Hi Goffredo,
Thanks for your review.
On 12/19/2012 02:00 AM, Goffredo Baroncelli wrote:
> Hi Jeff,
>
> On 12/18/2012 04:31 AM, Miao Xie wrote:
> [...]
>>> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> [...]
>
>>> +static int btrfs_ioctl_set_fslabel(struct file *file, void __user *arg)
>>>
On 12/19/2012 10:21 PM, David Sterba wrote:
> On Tue, Dec 18, 2012 at 11:06:07AM +0800, Jeff Liu wrote:
>> +static int btrfs_ioctl_set_fslabel(struct file *file, void __user *arg)
>> +{
>> +struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root;
>&
With the new ioctl(2) BTRFS_IOC_GET_FSLABEL we can fetch the label of a mounted
file system.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
Cc: Miao Xie
Cc: Goffredo Baroncelli
Cc: David Sterba
---
fs/btrfs/ioctl.c | 15 +++
fs/btrfs/ioctl.h |2 ++
2 files changed, 17 in
With the new ioctl(2) BTRFS_IOC_SET_FSLABEL, we can set/change the label of a
mounted file system.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
Cc: Miao Xie
Cc: Goffredo Baroncelli
Cc: David Sterba
---
fs/btrfs/ioctl.c | 39 +++
fs/btrfs/ioctl.h |
Hello,
Per David's comments upon v6, I missed a check up against the return value of
btrfs_end_transaction for
btrfs_ioctl_fs_setlabel(), it was fixed in this version.
v7->v6:
- take care of btrfs_end_transaction() in btrfs_ioctl_fs_setlabel() rather than
keeping silence.
The old versions can
Hi Goffredo,
On 12/21/2012 04:18 AM, Goffredo Baroncelli wrote:
> HI Jeff,
>
> On 12/20/2012 09:43 AM, Jeff Liu wrote:
>> With the new ioctl(2) BTRFS_IOC_GET_FSLABEL we can fetch the label of a
>> mounted file system.
>>
>> Signed-off-by: Jie Liu
>> Sig
On 12/22/2012 01:36 AM, Goffredo Baroncelli wrote:
> On 12/21/2012 07:42 AM, Jeff Liu wrote:
>> Hi Goffredo,
>>
>> On 12/21/2012 04:18 AM, Goffredo Baroncelli wrote:
>>> HI Jeff,
>>>
>>> On 12/20/2012 09:43 AM, Jeff Liu wrote:
>>>> With t
On 12/24/2012 09:46 PM, Goffredo Baroncelli wrote:
> Hi Jeff,
>
> On 12/24/2012 09:07 AM, Jeff Liu wrote:
>> On 12/22/2012 01:36 AM, Goffredo Baroncelli wrote:
>>> On 12/21/2012 07:42 AM, Jeff Liu wrote:
> [...]
>>>> I don't think we should replace str
Add a new ioctl(2) BTRFS_IOC_GET_FSLABLE, so that we can get the label upon a
mounted file system.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
Cc: Miao Xie
Cc: Goffredo Baroncelli
Cc: David Sterba
---
fs/btrfs/ioctl.c | 22 ++
fs/btrfs/ioctl.h |2 ++
2 files
Hello,
Here is the updated version of introduce get/set_or_change label upon a mounted
filesystem.
v8->v7:
btrfs_ioc_fs_getlabel():
- Examine the label length with strnlen().
- Tweak up warn() info if the label is not NUL terminated according to
Goffredo's suggestions.
The old versions can be
With this new ioctl(2) BTRFS_IOC_SET_FSLABEL, we can set/change the label of a
mounted file system.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
Reviewed-by: Miao Xie
Reviewed-by: Goffredo Baroncelli
Reviewed-by: David Sterba
---
fs/btrfs/ioctl.c | 39
On 12/28/2012 08:03 PM, David Sterba wrote:
> On Fri, Dec 28, 2012 at 11:42:40AM +0800, Jeff Liu wrote:
>> +static int btrfs_ioctl_set_fslabel(struct file *file, void __user *arg)
>> +{
>> +struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root;
>&
Add a new ioctl(2) BTRFS_IOC_GET_FSLABLE, so that we can get the label upon a
mounted filesystem.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
Cc: Miao Xie
Cc: Goffredo Baroncelli
Cc: David Sterba
---
fs/btrfs/ioctl.c | 21 +
fs/btrfs/ioctl.h |2 ++
2 files ch
With this new ioctl(2) BTRFS_IOC_SET_FSLABEL, we can set/change the label of a
mounted file system.
Signed-off-by: Jie Liu
Signed-off-by: Anand Jain
Reviewed-by: Miao Xie
Reviewed-by: Goffredo Baroncelli
Reviewed-by: David Sterba
---
fs/btrfs/ioctl.c | 42
Hello,
There have a couple of changes in this version which were shown as following:
- Don't reserve an unit of transactions for set filesystem label.
- Replace the old warning message to "btrfs: label is too long, return the
first %zu bytes"
in btrfs_ioc_get_fslabel() is the existing label l
simple_strtoull() is obsolete, use kstrtoull() instead.
Signed-off-by: Jie Liu
---
fs/btrfs/ioctl.c |9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 8fcf9a5..b147424 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -
Hi,
On 01/07/2013 02:44 AM, Goffredo Baroncelli wrote:
> Hi Jeff,
>
> On 01/05/2013 03:48 AM, Jeff Liu wrote:
>> Add a new ioctl(2) BTRFS_IOC_GET_FSLABLE, so that we can get the label upon
>> a mounted filesystem.
>>
>> Signed-off-by: Jie Liu
>> Signed-off
On 01/08/2013 12:03 AM, David Sterba wrote:
> On Sun, Jan 06, 2013 at 11:53:41AM +0800, Jeff Liu wrote:
>> -devid = simple_strtoull(devstr, &end, 10);
>> +ret = kstrtoull(devstr, 10, &devid);
>> +if (ret) {
>> +
Hi Goffredo,
On 01/08/2013 01:32 AM, Goffredo Baroncelli wrote:
> Hi Jeff,
>
> On 01/07/2013 07:24 AM, Jeff Liu wrote:
>> Hi,
>> On 01/07/2013 02:44 AM, Goffredo Baroncelli wrote:
>>> Hi Jeff,
>>>
>>> On 01/05/2013 03:48 AM, Jeff Liu wrote:
>&g
Fix a sparse warning:
fs/btrfs/delayed-ref.c:236:1: warning: ‘inline’ is not at beginning of
declaration [-Wold-style-declaration]
Signed-off-by: Jie Liu
---
fs/btrfs/delayed-ref.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-r
Remove the owner variable as well as it related stuff.
owner is meaningless in btrfs_new_inode() context, clean it out.
Signed-off-by: Jie Liu
---
fs/btrfs/inode.c |6 --
1 file changed, 6 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 95542a1..f56eae1 100644
---
Hi Simon,
For the next time when you post btrfs-progs related patches, please
indicate it with a suffix "Btrfs-progs: " on the subject.
Thanks,
-Jeff
On 01/09/2013 02:46 PM, Simon Xu wrote:
> Remove "device show" from btrfs man page as it's not supported by the
> btrfs utility.
> ---
> man/btrfs
On 01/10/2013 04:57 PM, Dan Carpenter wrote:
> The closing parenthesis is in the wrong place. We want to check
> "sizeof(*arg->clone_sources) * arg->clone_sources_count" instead of
> "sizeof(*arg->clone_sources * arg->clone_sources_count)".
>
> Signed-off-by: Dan Carpenter
> ---
> This is also v
"if"
>> Signed-off-by: Gene Czarcinski
>> ---
>> btrfslabel.c | 57 +++++
>
> Jeff Liu has sent a series that updates the code and also fixes the
> formatting. And I'd prefer to take his series as a more extensiv
Hello,
As per David's suggestions, we should remove btrfslabel source code and move the
related functions to cmds-filesystems or utils.
I prefer to move them into utils since there already has a check_label()
function
which can be used for the pre-checkup against the input label.
This patch se
Refactor check_label().
Make it be static at first, this is a preparation step since we'll remove
btrfslabel.[c|h] and move those functions at them to utils.[c|h], we can do
pre-checking against the input label string with it.
Also, fix the input lable length verfication from BTRFS_LABEL_SIZE to
Clean btrfslabel.[c|h] out of the source tree and move those related
functions to utils.[c|h].
Signed-off-by: Jie Liu
CC: David Sterba
CC: Gene Czarcinski
---
Makefile |4 +-
btrfslabel.c | 178 -
btrfslabel.h |5 -
On 01/29/2013 06:26 PM, Stefan Behrens wrote:
> On Tue, 29 Jan 2013 14:24:13 +0800, Jeff Liu wrote:
>> Clean btrfslabel.[c|h] out of the source tree and move those related
>> functions to utils.[c|h].
>>
>> Signed-off-by: Jie Liu
>> CC: David Sterba
>> C
On 01/29/2013 11:19 PM, David Sterba wrote:
> On Tue, Jan 29, 2013 at 02:24:12PM +0800, Jeff Liu wrote:
>> --- a/utils.c
>> +++ b/utils.c
>> @@ -1122,17 +1122,21 @@ char *pretty_sizes(u64 size)
>>-1if the label is too long
>>-2if the la
Refactor check_label().
- Make it be static at first, this is a preparation step since we'll remove
btrfslabel.[c|h] and move those functions from there to utils.[c|h], we can
do pre-checking against the input label string with it.
- Fix the label length check up from BTRFS_LABEL_SIZE to BTRFS_LAB
Clean btrfslabel.[c|h] out of the source tree and move those related
functions to utils.[c|h].
Signed-off-by: Jie Liu
CC: David Sterba
CC: Gene Czarcinski
---
Makefile |4 +-
btrfslabel.c | 178 -
btrfslabel.h |5
From: Jie Liu
Return the actual error code if call kset_create_and_add() failed
Cc: Chris Mason
Cc: Josef Bacik
Signed-off-by: Jie Liu
---
fs/btrfs/sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index df39458..8f7dfa7 10064
Hi,
On 06/17/2014 22:32 PM, Jeff Liu wrote:
> From: Jie Liu
>
> Return the actual error code if call kset_create_and_add() failed
>
> Cc: Chris Mason
> Cc: Josef Bacik
> Signed-off-by: Jie Liu
Please ignore this patch because Greg think that is incorrect.
Cheers,
-J
/* Extent information: a malloc'd array of ei_count structs. */
struct extent_info *ext_info;
};
-void extent_scan_init (int src_fd, struct extent_scan *scan);
+bool extent_scan_init (int src_fd, size_t src_total_size,
+ struct extent_scan *scan);
bool extent_scan_read (s
Hello,
I think we don't need to fetch the inode size in advance. :-P.
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index e7872e4..f8ad957 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1698,7 +1698,7 @@ static int find_desired_extent(struct inode
*inode, loff_t *offset, int origin)
Hello,
In btrfs_file_llseek(), if the offset < 0 or offset >
inode->i_sb->s_maxbytes, we should return -EINVAL rather than offset.
Also, if the offset >= inode->i_size for SEEK_DATA or SEEK_HOLE, return
-ENXIO is ok IMHO.
Signed-off-by: Jie Liu
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
Hello,
in btrfs_ioctl_clone(), using u32 for super_block->s_blocksize assignment.
Signed-off-by: Jie Liu
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 970977a..03ab77a 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2133,12 +2133,12 @@ static noinline long btrfs_ioctl_clone(s
mp;& !(file->f_mode & FMODE_UNSIGNED_OFFSET)) {
-ret = -EINVAL;
+offset = -EINVAL;
goto out;
}
if (offset > inode->i_sb->s_maxbytes) {
-ret = -EINVAL;
+offset = -EINVAL;
goto out;
}
--
1.7.4.1
On 08/29/2011 05:48 PM, Jef
Hello,
While going through the mkfs.c, I noticed there is an issue for label
length checking, mkfs.btrfs will crashed if the label length exceeding
255 bytes, it's easy to triggered that out as below:
jeff@pibroch:~/opensource/btrfs-progs$ sudo ./mkfs.btrfs -L `perl -e
'print "A"x256'` /usr/
Hello,
I'd like to introduce a new ioctl to set file system label.
With this feature, we can execute `btrfs filesystem label [label]
[path]` through btrfs tools to set or change the label.
Signed-off-by: Jie Liu
---
fs/btrfs/ctree.h |6 ++
fs/btrfs/ioctl.c | 37 ++
Hello,
This patch make use of the new ioctl(2) to set Btrfs label via `btrfs
filesystem label` command.
Signed-off-by: Jie Liu
---
btrfs.c |7 +++
btrfs_cmds.c | 27 +++
btrfs_cmds.h |1 +
ctree.h |6 ++
ioctl.h |2 ++
mkfs.c
Hi Hugo,
On 09/01/2011 05:00 PM, Hugo Mills wrote:
On Thu, Sep 01, 2011 at 04:47:47PM +0800, Jeff Liu wrote:
Hello,
I'd like to introduce a new ioctl to set file system label.
With this feature, we can execute `btrfs filesystem label [label]
[path]` through btrfs tools to set or chang
-
1.7.4.1
On 09/01/2011 05:32 PM, Hugo Mills wrote:
On Thu, Sep 01, 2011 at 05:18:38PM +0800, Jeff Liu wrote:
Hi Hugo,
On 09/01/2011 05:00 PM, Hugo Mills wrote:
On Thu, Sep 01, 2011 at 04:47:47PM +0800, Jeff Liu wrote:
Hello,
I'd like to introduce a new ioctl to set file system label.
Wi
#x27;\\') {
+fprintf(stderr, "invalid label %s\n", input);
+exit(1);
+}
+}
+return strdup(input);
+}
diff --git a/utils.h b/utils.h
index 9dce5b0..9212a75 100644
--- a/utils.h
+++ b/utils.h
@@ -40,4 +40,5 @@ int check_mounted(const char *devicenam
07:52:54PM +0800, Jeff Liu wrote:
Revise the patch according to kernel side change.
Leave original commit message. If you want to document changes between
revised patch version put them ...
ok, fixed as below:
From e2990b69ecd3bac8da8023a64c866d16c81a1679 Mon Sep 17 00:00:00 2001
From: Jie Liu
在 2011-9-2,下午11:48, David Sterba 写道:
> On Fri, Sep 02, 2011 at 09:13:34PM +0800, Jeff Liu wrote:
>> --- a/ioctl.h
>> +++ b/ioctl.h
>> @@ -140,6 +140,8 @@ struct btrfs_ioctl_space_args {
>>struct btrfs_ioctl_vol_args)
>> #define BTRFS_IOC_S
On 09/05/2011 01:03 AM, Hugo Mills wrote:
On Sat, Sep 03, 2011 at 11:11:36AM +0800, Jeff liu wrote:
在 2011-9-2,下午11:48, David Sterba 写道:
On Fri, Sep 02, 2011 at 09:13:34PM +0800, Jeff Liu wrote:
--- a/ioctl.h
+++ b/ioctl.h
@@ -140,6 +140,8 @@ struct btrfs_ioctl_space_args
Hello,
According to Hugo and David's advise, the ioctl number of
BTRFS_IOC_FS_SETLABEL ioctl was changed to 50 now.
Signed-off-by: Jie Liu
---
fs/btrfs/ctree.h |4
fs/btrfs/ioctl.c | 36
fs/btrfs/ioctl.h |2 ++
3 files changed, 42 insertio
exit(1);
+}
+}
+return strdup(input);
+}
diff --git a/utils.h b/utils.h
index 9dce5b0..9212a75 100644
--- a/utils.h
+++ b/utils.h
@@ -40,4 +40,5 @@ int check_mounted(const char *devicename);
int btrfs_device_already_in_root(struct btrfs_root *root, int fd,
int
Hello,
I was trying to create a multi-device Btrfs filesystem using two
loopback devices, by referring to the following page:
https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices
However, I met a strange thing while mounting the first loop device
without any extra mount o
1 - 100 of 111 matches
Mail list logo