Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2015-02-27 Thread David Sterba
On Thu, Sep 04, 2014 at 12:45:45PM -0700, Zach Brown wrote: --- a/utils.h +++ b/utils.h @@ -71,13 +71,17 @@ int check_mounted_where(int fd, const char *file, char *where, int size, int btrfs_device_already_in_root(struct btrfs_root *root, int fd, int

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2014-09-15 Thread David Sterba
On Fri, Sep 05, 2014 at 06:20:49PM +0200, David Sterba wrote: On Fri, Sep 05, 2014 at 08:55:01AM -0700, Zach Brown wrote: David, let me know if you want me to change anything or resend so you don't have to pull this out of a reply in a thread. Thanks, I'm now aware of the patch in the

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2014-09-05 Thread Anand Jain
Great! Thanks Zach for your quick patch. it works. Anand On 05/09/2014 03:45, Zach Brown wrote: On Thu, Sep 04, 2014 at 07:43:08PM +0800, Anand Jain wrote: + static __thread char _str[24]; This patch is causing segmentation fault as it reached maximum stack depth on

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2014-09-05 Thread Zach Brown
Great! Thanks Zach for your quick patch. it works. Cool. From 3d132362f4c87b065b63cb38726a030db2277919 Mon Sep 17 00:00:00 2001 From: Zach Brown z...@zabbo.net Date: Thu, 4 Sep 2014 12:32:00 -0700 Subject: [PATCH] btrfs-progs: use pretty printing macros David, let me know if you want me

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2014-09-05 Thread David Sterba
On Fri, Sep 05, 2014 at 08:55:01AM -0700, Zach Brown wrote: David, let me know if you want me to change anything or resend so you don't have to pull this out of a reply in a thread. Thanks, I'm now aware of the patch in the thread. -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2014-09-04 Thread Anand Jain
+ static __thread char _str[24]; This patch is causing segmentation fault as it reached maximum stack depth on the sparc machine. Just earlier method of malloc is better ? unless we want to change the stack depth. Any comments ? Thanks, Anand On 07/10/2013 10:30 PM, David

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2014-09-04 Thread Zach Brown
On Thu, Sep 04, 2014 at 07:43:08PM +0800, Anand Jain wrote: + static __thread char _str[24]; This patch is causing segmentation fault as it reached maximum stack depth on the sparc machine. Sigh. I guess it was inevitable that this would fail somewhere :). Just earlier

[PATCH] btrfs-progs: per-thread, per-call pretty buffer

2013-07-10 Thread David Sterba
From: Zach Brown z...@redhat.com From: Zach Brown z...@redhat.com We don't need callers to manage string storage for each pretty_sizes() call. We can use a macro to have per-thread and per-call static storage so that pretty_sizes() can be used as many times as needed in printf() arguments

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2013-07-10 Thread Wang Shilong
Hello David, From: Zach Brown z...@redhat.com duplicate information. From: Zach Brown z...@redhat.com We don't need callers to manage string storage for each pretty_sizes() call. We can use a macro to have per-thread and per-call static storage so that pretty_sizes() can be used as

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2013-07-10 Thread David Sterba
On Wed, Jul 10, 2013 at 11:31:17PM +0800, Wang Shilong wrote: Hello David, From: Zach Brown z...@redhat.com duplicate information. git-send-email tricked me, the line is not present in thre tree From: Zach Brown z...@redhat.com We don't need callers to manage string storage for

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2013-07-10 Thread Hugo Mills
Sorry to be a pain in the arse at this late stage of the patch, but I've only just noticed. On Wed, Jul 10, 2013 at 04:30:15PM +0200, David Sterba wrote: static char *size_strs[] = { , KB, MB, GB, TB, - PB, EB, ZB, YB}; -char *pretty_sizes(u64 size) +

Re: [PATCH] btrfs-progs: per-thread, per-call pretty buffer

2013-07-10 Thread David Sterba
On Wed, Jul 10, 2013 at 05:16:23PM +0100, Hugo Mills wrote: Sorry to be a pain in the arse at this late stage of the patch, but I've only just noticed. No worries, good to have this one fixed. david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a