Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1445361 > unrolled thread

Re: [PATCH] bcache: untagle cache_aolloc

Started byKent Overstreet <kent.overstreet@gmail.com>
First post2016-07-18 12:20 +0200
Last post2016-07-18 12:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] bcache: untagle cache_aolloc Kent Overstreet <kent.overstreet@gmail.com> - 2016-07-18 12:20 +0200
    Re: [PATCH] bcache: untagle cache_aolloc Kent Overstreet <kent.overstreet@gmail.com> - 2016-07-18 12:30 +0200
    Re: [PATCH] bcache: untagle cache_aolloc Johannes Thumshirn <jthumshirn@suse.de> - 2016-07-18 12:30 +0200

#1445361 — Re: [PATCH] bcache: untagle cache_aolloc

FromKent Overstreet <kent.overstreet@gmail.com>
Date2016-07-18 12:20 +0200
SubjectRe: [PATCH] bcache: untagle cache_aolloc
Message-ID<rWdOy-4To-7@gated-at.bofh.it>
On Mon, Jul 18, 2016 at 12:11:09PM +0200, Johannes Thumshirn wrote:
> bcache's cache_alloc() function currenty has no way freeing memory if one of
> the allocations fails. Untangle the if + allocation statement so we have
> defined checkpoints to free previous allocations if one fails.

nack. The existing error path handles failure midway through just fine.

[toc] | [next] | [standalone]


#1445366

FromKent Overstreet <kent.overstreet@gmail.com>
Date2016-07-18 12:30 +0200
Message-ID<rWdYd-4WI-27@gated-at.bofh.it>
In reply to#1445361
On Mon, Jul 18, 2016 at 12:24:11PM +0200, Johannes Thumshirn wrote:
> On Mon, Jul 18, 2016 at 02:13:33AM -0800, Kent Overstreet wrote:
> > On Mon, Jul 18, 2016 at 12:11:09PM +0200, Johannes Thumshirn wrote:
> > > bcache's cache_alloc() function currenty has no way freeing memory if one of
> > > the allocations fails. Untangle the if + allocation statement so we have
> > > defined checkpoints to free previous allocations if one fails.
> > 
> > nack. The existing error path handles failure midway through just fine.
> 
> Come on, the patch improves the readability of the if statement by some orders
> of magnitude as well.
> 
> Are you OK with it if I change the subject/commit log?

No, it's just churn and I don't agree that it improves readability. On the
contrary, now the cleanup code has to be duplicated in two places - which
invites them getting out of sync and introducing bugs.

[toc] | [prev] | [next] | [standalone]


#1445367

FromJohannes Thumshirn <jthumshirn@suse.de>
Date2016-07-18 12:30 +0200
Message-ID<rWdYd-4WI-29@gated-at.bofh.it>
In reply to#1445361
On Mon, Jul 18, 2016 at 02:13:33AM -0800, Kent Overstreet wrote:
> On Mon, Jul 18, 2016 at 12:11:09PM +0200, Johannes Thumshirn wrote:
> > bcache's cache_alloc() function currenty has no way freeing memory if one of
> > the allocations fails. Untangle the if + allocation statement so we have
> > defined checkpoints to free previous allocations if one fails.
> 
> nack. The existing error path handles failure midway through just fine.

Come on, the patch improves the readability of the if statement by some orders
of magnitude as well.

Are you OK with it if I change the subject/commit log?

	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web