All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer.
@ 2016-09-13 10:55 Marcin Mirosław
  2016-09-13 10:55 ` [PATCH v2 2/4] No need to spawn subshell for every source file Marcin Mirosław
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Marcin Mirosław @ 2016-09-13 10:55 UTC (permalink / raw)
  To: linux-bcache; +Cc: Marcin Mirosław

Currently is adding "-static" to linker flags. This needs compiling a couple of dependent libraries to get static
version of it. It is a little problematic, at least on Gentoo. Also static binary isn't needed for typical usage, if
somebody need it then it's easy to add "-static" to env variable LDFLAGS and get static binary.
Similar to CFLAGS, it's easier to add "-g" to CFLAGS than negating it by using "-g0".

Signed-off-by: Marcin Mirosław <marcin@mejor.pl>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 9f2773e..e9ca92d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 
 PREFIX=/usr
 INSTALL=install
-CFLAGS+=-std=gnu99 -O2 -Wall -g -D_FILE_OFFSET_BITS=64 -I.
-LDFLAGS+=-static
+CFLAGS:=-std=gnu99 -O2 -Wall -D_FILE_OFFSET_BITS=64 -I. $(CFLAGS)
+LDFLAGS+=
 
 PKGCONFIG_LIBS="blkid uuid libnih"
 CFLAGS+=`pkg-config --cflags	${PKGCONFIG_LIBS}`
-- 
2.7.3

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

* [PATCH v2 2/4] No need to spawn subshell for every source file.
  2016-09-13 10:55 [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer Marcin Mirosław
@ 2016-09-13 10:55 ` Marcin Mirosław
  2016-09-13 10:55 ` [PATCH v2 3/4] Make --help and man more consistent Marcin Mirosław
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Marcin Mirosław @ 2016-09-13 10:55 UTC (permalink / raw)
  To: linux-bcache; +Cc: Marcin Mirosław

Until now every time cc was invoked also was pkgconfig invoked:
$ cc ... `pkg-config --cflags        "blkid uuid libnih"`
Output of pkg-config can be gather once and then used for all compiler invocation.

Signed-off-by: Marcin Mirosław <marcin@mejor.pl>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index e9ca92d..a3cb1fa 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,8 @@ CFLAGS:=-std=gnu99 -O2 -Wall -D_FILE_OFFSET_BITS=64 -I. $(CFLAGS)
 LDFLAGS+=
 
 PKGCONFIG_LIBS="blkid uuid libnih"
-CFLAGS+=`pkg-config --cflags	${PKGCONFIG_LIBS}`
-LDLIBS+=`pkg-config --libs	${PKGCONFIG_LIBS}` -lscrypt -lsodium -lkeyutils
+CFLAGS+=$(shell pkg-config --cflags	${PKGCONFIG_LIBS})
+LDLIBS+=$(shell pkg-config --libs	${PKGCONFIG_LIBS}) -lscrypt -lsodium -lkeyutils
 
 ifeq ($(PREFIX),/usr)
 	ROOT_SBINDIR=/sbin
-- 
2.7.3

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

* [PATCH v2 3/4] Make --help and man more consistent
  2016-09-13 10:55 [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer Marcin Mirosław
  2016-09-13 10:55 ` [PATCH v2 2/4] No need to spawn subshell for every source file Marcin Mirosław
@ 2016-09-13 10:55 ` Marcin Mirosław
  2016-09-13 10:55 ` [PATCH v2 4/4] Remove unimplemented options from manpage Marcin Mirosław
  2016-09-13 15:33 ` [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer Coly Li
  3 siblings, 0 replies; 6+ messages in thread
From: Marcin Mirosław @ 2016-09-13 10:55 UTC (permalink / raw)
  To: linux-bcache; +Cc: Marcin Mirosław

Options displayed by `bcache format --help` wasn't accepted by bcache. Man bcache is a little bit more descriptive
now.

Signed-off-by: Marcin Mirosław <marcin@mejor.pl>
---
 bcache-format.c | 20 ++++++++++----------
 bcache.8        | 13 +++++++------
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/bcache-format.c b/bcache-format.c
index 1b20b55..c092344 100644
--- a/bcache-format.c
+++ b/bcache-format.c
@@ -75,23 +75,23 @@ static void usage(void)
 	     "Usage: bcache format [OPTION]... <devices>\n"
 	     "\n"
 	     "Options:\n"
-	     "  -b, --block=size\n"
-	     "      --btree_node=size       Btree node size, default 256k\n"
-	     "      --metadata_checksum_type=(none|crc32c|crc64)\n"
-	     "      --data_checksum_type=(none|crc32c|crc64)\n"
-	     "      --compression_type=(none|lz4|gzip)\n"
+	     "  -b, --block=size in bytes               default is highest block size from all formated devices\n"
+	     "      --btree_node_size=size in bytes     Btree node size, default and max supported 256k\n"
+	     "      --metadata_checksum_type=           (none|crc32c [default]|crc64)\n"
+	     "      --data_checksum_type=               (none|crc32c [default]|crc64)\n"
+	     "      --compression_type=                 (none [default]|lz4|gzip)\n"
 	     "      --encrypted\n"
-	     "      --error_action=(continue|readonly|panic)\n"
-	     "                              Action to take on filesystem error\n"
-	     "  -l, --label=label\n"
-	     "      --uuid=uuid\n"
+	     "      --error_action=                     (continue|readonly [default]|panic)\n"
+	     "                                    Action to take on filesystem error\n"
+	     "  -L, --label=label\n"
+	     "  -U, --uuid=uuid\n"
 	     "  -f, --force\n"
 	     "\n"
 	     "Device specific options:\n"
 	     "      --fs_size=size          Size of filesystem on device\n"
 	     "      --bucket=size           bucket size\n"
 	     "      --discard               Enable discards\n"
-	     "  -t, --tier=#                tier of subsequent devices\n"
+	     "  -t, --tier=#                tier level of subsequent devices\n"
 	     "\n"
 	     "  -h, --help                  display this help and exit\n"
 	     "\n"
diff --git a/bcache.8 b/bcache.8
index 7671cf3..14aae3e 100644
--- a/bcache.8
+++ b/bcache.8
@@ -64,12 +64,13 @@ List the bcache commands
 .SH Global options:
 .TP
 .BR \-w,\ --block=
-block size, in bytes (e.g. 4k)
+block size, in bytes (e.g. 4096) - default is highest block size from all formated devices
 .TP
-.BR \-w,\ --btree_node_size=
-btree node size in bytes - default 256k
+.BR \--btree_node_size=
+btree node size in bytes - default and maximum is 256k
 .TP
 .BR \--metadata_checksum_type=TYPE
+where TYPE is one of none, crc32c (default), or crc64
 .TP
 .BR \--data_checksum_type=TYPE
 where TYPE is one of none, crc32c (default), or crc64
@@ -83,10 +84,10 @@ Enable encryption; passphrase will be prompted for
 .BR \--error_action=TYPE
 where TYPE is one of continue, readonly (default) or panic
 .TP
-.BR \-l\ --label=LABEL
+.BR \-L\ --label=LABEL
 Create the filesystem with the specified label
 .TP
-.BR \--uuid=UUID
+.BR \-U\ --uuid=UUID
 Create the filesystem with the specified UUID
 .TP
 .BR \--force
@@ -98,7 +99,7 @@ filesystem
 .BR \--fs_size=SIZE
 Create the filesystem using SIZE bytes on the subsequent device
 .TP
-.BR \-b\ --bucket-size=SIZE
+.BR \--bucket-size=SIZE
 Specifies the bucket size - must be greater than the btree node size
 .TP
 .BR \-t,\ --tier=INDEX
-- 
2.7.3

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

* [PATCH v2 4/4] Remove unimplemented options from manpage
  2016-09-13 10:55 [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer Marcin Mirosław
  2016-09-13 10:55 ` [PATCH v2 2/4] No need to spawn subshell for every source file Marcin Mirosław
  2016-09-13 10:55 ` [PATCH v2 3/4] Make --help and man more consistent Marcin Mirosław
@ 2016-09-13 10:55 ` Marcin Mirosław
  2016-09-13 15:33 ` [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer Coly Li
  3 siblings, 0 replies; 6+ messages in thread
From: Marcin Mirosław @ 2016-09-13 10:55 UTC (permalink / raw)
  To: linux-bcache; +Cc: Marcin Mirosław

I'm removing remainders from bcache - block device cache.

Signed-off-by: Marcin Mirosław <marcin@mejor.pl>
---
 bcache.8 | 43 -------------------------------------------
 1 file changed, 43 deletions(-)

diff --git a/bcache.8 b/bcache.8
index 14aae3e..ddb41cd 100644
--- a/bcache.8
+++ b/bcache.8
@@ -109,46 +109,3 @@ two tiers are supported.
 .TP
 .BR \--discard
 Enable discards on subsequent devices
-
-.SH Options for register
-
-.SH Options for list-cachesets
-.TP
-.BR \-d,\ --dir=
-Provide a directory other than /sys/fs/bcache
-
-.SH Options for query-devs
-.TP
-.BR \-f,\ --force-csum
-Enables bcache to going even if the superblock crc is invalid
-
-.SH Options for status
-
-.SH Options for stats
-.TP
-.BR \-a,\ --all
-List all stats and their values for the given device.
-.TP
-.BR \-l,\ --list
-List the names of the different stats for the given device.
-.TP
-.BR \-u,\ --set=
-UUID for the cacheset
-.TP
-.BR \-d,\ --dev=
-UUID for a device within the cacheset. Must pass in the cacheset UUID in order to search for a dev.
-.TP
-.BR \-c,\ --cache=
-Cache number, starts from 0
-.TP
-.BR \--five-min-stats
-stats accumulated in the last 5 minutes
-.TP
-.BR \--hour-stats
-stats accumulated in the last hour
-.TP
-.BR \--day-stats
-stats accumulated in the last day
-.TP
-.BR \--total-stats
-stats accumulated in total
-- 
2.7.3

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

* Re: [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer.
  2016-09-13 10:55 [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer Marcin Mirosław
                   ` (2 preceding siblings ...)
  2016-09-13 10:55 ` [PATCH v2 4/4] Remove unimplemented options from manpage Marcin Mirosław
@ 2016-09-13 15:33 ` Coly Li
  2016-09-14  8:39   ` [PATCH v2 1/4][Resend] " Marcin Mirosław
  3 siblings, 1 reply; 6+ messages in thread
From: Coly Li @ 2016-09-13 15:33 UTC (permalink / raw)
  To: Marcin Mirosław, linux-bcache

在 16/9/13 下午6:55, Marcin Mirosław 写道:
> Currently is adding "-static" to linker flags. This needs compiling a couple of dependent libraries to get static
> version of it. It is a little problematic, at least on Gentoo. Also static binary isn't needed for typical usage, if
> somebody need it then it's easy to add "-static" to env variable LDFLAGS and get static binary.
> Similar to CFLAGS, it's easier to add "-g" to CFLAGS than negating it by using "-g0".
>

Hi Marcin,

Do you mean bcache-tools/Makefile ? I can see '-g', but for '-static' I
don't see it.

I clone the code from https://github.com/g2p/bcache-tools.git, or should
I look at other code ?


Coly

> Signed-off-by: Marcin Mirosław <marcin@mejor.pl>
> ---
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 9f2773e..e9ca92d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,8 +1,8 @@
>  
>  PREFIX=/usr
>  INSTALL=install
> -CFLAGS+=-std=gnu99 -O2 -Wall -g -D_FILE_OFFSET_BITS=64 -I.
> -LDFLAGS+=-static
> +CFLAGS:=-std=gnu99 -O2 -Wall -D_FILE_OFFSET_BITS=64 -I. $(CFLAGS)
> +LDFLAGS+=
>  
>  PKGCONFIG_LIBS="blkid uuid libnih"
>  CFLAGS+=`pkg-config --cflags	${PKGCONFIG_LIBS}`
> 


-- 
Coly Li

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

* Re: [PATCH v2 1/4][Resend] Leave choosing level of optimalization and linker flags to package maintainer.
  2016-09-13 15:33 ` [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer Coly Li
@ 2016-09-14  8:39   ` Marcin Mirosław
  0 siblings, 0 replies; 6+ messages in thread
From: Marcin Mirosław @ 2016-09-14  8:39 UTC (permalink / raw)
  To: linux-bcache

[resend due to: 550 5.7.1 Content-Policy reject msg: Wrong MIME labeling
on 8-bit character texts. BF:<H 0.278797>; S932461AbcIMTLh]

W dniu 2016-09-13 o 17:33, Coly Li pisze:
Hi!

> 在 16/9/13 下午6:55, Marcin Mirosław 写道:
>> Currently is adding "-static" to linker flags. This needs compiling a couple of dependent libraries to get static
>> version of it. It is a little problematic, at least on Gentoo. Also static binary isn't needed for typical usage, if
>> somebody need it then it's easy to add "-static" to env variable LDFLAGS and get static binary.
>> Similar to CFLAGS, it's easier to add "-g" to CFLAGS than negating it by using "-g0".
>>
>
> Hi Marcin,
>
> Do you mean bcache-tools/Makefile ? I can see '-g', but for '-static' I
> don't see it.
>
> I clone the code from https://github.com/g2p/bcache-tools.git, or should
> I look at other code ?

You should look at branch "dev". Probably I should put this information
somewhere but I don't know where. In subject?

> Coly

Thanks, Marcin

>
>> Signed-off-by: Marcin Mirosław <marcin@mejor.pl>
>> ---
>>  Makefile | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 9f2773e..e9ca92d 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1,8 +1,8 @@
>>
>>  PREFIX=/usr
>>  INSTALL=install
>> -CFLAGS+=-std=gnu99 -O2 -Wall -g -D_FILE_OFFSET_BITS=64 -I.
>> -LDFLAGS+=-static
>> +CFLAGS:=-std=gnu99 -O2 -Wall -D_FILE_OFFSET_BITS=64 -I. $(CFLAGS)
>> +LDFLAGS+=
>>
>>  PKGCONFIG_LIBS="blkid uuid libnih"
>>  CFLAGS+=`pkg-config --cflags	${PKGCONFIG_LIBS}`
>>
>
>

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

end of thread, other threads:[~2016-09-14  8:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-13 10:55 [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer Marcin Mirosław
2016-09-13 10:55 ` [PATCH v2 2/4] No need to spawn subshell for every source file Marcin Mirosław
2016-09-13 10:55 ` [PATCH v2 3/4] Make --help and man more consistent Marcin Mirosław
2016-09-13 10:55 ` [PATCH v2 4/4] Remove unimplemented options from manpage Marcin Mirosław
2016-09-13 15:33 ` [PATCH v2 1/4] Leave choosing level of optimalization and linker flags to package maintainer Coly Li
2016-09-14  8:39   ` [PATCH v2 1/4][Resend] " Marcin Mirosław

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.