linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: allow user to insert property compression=none to file.
@ 2022-01-16  8:52 Li Zhang
  2022-01-17 13:44 ` David Sterba
  0 siblings, 1 reply; 4+ messages in thread
From: Li Zhang @ 2022-01-16  8:52 UTC (permalink / raw)
  To: linux-btrfs; +Cc: zhanglikernel

1. If the user adds the property "compression=none" to the file,
remove the code that converts the None string to an empty string.

Signed-off-by: Li Zhang <zhanglikernel@gmail.com>
---
 cmds/property.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cmds/property.c b/cmds/property.c
index b3ccc0f..ec1b408 100644
--- a/cmds/property.c
+++ b/cmds/property.c
@@ -190,8 +190,6 @@ static int prop_compression(enum prop_object_type type,
 	xattr_name[XATTR_BTRFS_PREFIX_LEN + strlen(name)] = '\0';
 
 	if (value) {
-		if (strcmp(value, "no") == 0 || strcmp(value, "none") == 0)
-			value = "";
 		sret = fsetxattr(fd, xattr_name, value, strlen(value), 0);
 	} else {
 		sret = fgetxattr(fd, xattr_name, NULL, 0);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-16 10:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16  8:52 [PATCH] btrfs-progs: allow user to insert property compression=none to file Li Zhang
2022-01-17 13:44 ` David Sterba
2022-01-19 10:49   ` li zhang
2022-02-16 10:44     ` Qu Wenruo

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).