* [PATCH v2] btrfs-progs: change filename limit to 255 when creating subvolume
@ 2018-09-18 1:17 Su Yanjun
2018-10-24 15:29 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Su Yanjun @ 2018-09-18 1:17 UTC (permalink / raw)
To: linux-btrfs; +Cc: Su Yanjun
Modify the file name length limit to meet the Linux naming convention.
In addition, the file name length is always bigger than 0, no need to
compare with 0 again.
Changelog:
v2:
Fix the same problem in creating snapshot routine.
Issue: #145
Signed-off-by: Su Yanjun <suyj.fnst@cn.fujitsu.com>
---
v2: Also fix the same problem in creating snapshot routine.
cmds-subvolume.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index e7a884af1f5d..5a446c1ae2b4 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -155,7 +155,7 @@ static int cmd_subvol_create(int argc, char **argv)
}
len = strlen(newname);
- if (len == 0 || len >= BTRFS_VOL_NAME_MAX) {
+ if (len > BTRFS_VOL_NAME_MAX) {
error("subvolume name too long: %s", newname);
goto out;
}
@@ -715,7 +715,7 @@ static int cmd_subvol_snapshot(int argc, char **argv)
}
len = strlen(newname);
- if (len == 0 || len >= BTRFS_VOL_NAME_MAX) {
+ if (len > BTRFS_VOL_NAME_MAX) {
error("snapshot name too long '%s'", newname);
goto out;
}
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] btrfs-progs: change filename limit to 255 when creating subvolume
2018-09-18 1:17 [PATCH v2] btrfs-progs: change filename limit to 255 when creating subvolume Su Yanjun
@ 2018-10-24 15:29 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2018-10-24 15:29 UTC (permalink / raw)
To: Su Yanjun; +Cc: linux-btrfs
On Tue, Sep 18, 2018 at 09:17:54AM +0800, Su Yanjun wrote:
> Modify the file name length limit to meet the Linux naming convention.
> In addition, the file name length is always bigger than 0, no need to
> compare with 0 again.
>
> Changelog:
> v2:
> Fix the same problem in creating snapshot routine.
>
> Issue: #145
> Signed-off-by: Su Yanjun <suyj.fnst@cn.fujitsu.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-24 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-18 1:17 [PATCH v2] btrfs-progs: change filename limit to 255 when creating subvolume Su Yanjun
2018-10-24 15:29 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).