Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1266213
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/8] block/genhd.c: Add error handling |
| Date | 2015-11-10 04:50 +0100 |
| Message-ID | <qt86t-87T-1@gated-at.bofh.it> (permalink) |
| References | <qrOjw-4rO-15@gated-at.bofh.it> <qrOjw-4rO-17@gated-at.bofh.it> <qt7WN-84G-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 11/09/2015 08:33 PM, Al Viro wrote: > On Fri, Nov 06, 2015 at 05:52:08PM +0530, Vishnu Pratap Singh wrote: > > Have you even tried to trigger the failure exits you've added? The > more you've successfully set up, the _less_ your cleanup code ends > up undoing; that simply can't be right. > > That aside, as soon as we'd done register_disk(), the damn thing is > available for open(), so bailing out is _really_ not something for > faint-hearted - it's essentially equivalent to removal of device under > somebody who'd opened it and might've started IO, etc. Going there > simply because some sysfs shite didn't get created doesn't look sane > as far as I'm concerned... > > Especially since these failure exits are not going to be tested on > a regular basis, so the amount of bitrot will be pretty high ;-/ I'd greatly prefer it we just leave it alone. Much better to have a disk that does actually work and with some sysfs spew in the logs, than bail out for fairly vague reasons. The road to hell is paved with good intentions. It's a noble thought to want to clean this up, but I think it does more harm than good. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/8] block/genhd.c: Add error handling Vishnu Pratap Singh <vishnu.ps@samsung.com> - 2015-11-06 13:30 +0100
[PATCH 3/8] block/floppy.c: handle blk_register_region() return value Vishnu Pratap Singh <vishnu.ps@samsung.com> - 2015-11-06 13:30 +0100
[PATCH 3/8] block/floppy.c: handle blk_register_region() return value Vishnu Pratap Singh <vishnu.ps@samsung.com> - 2015-11-09 04:20 +0100
Re: [PATCH 3/8] block/floppy.c: handle blk_register_region() return value Grant Grundler <grundler@chromium.org> - 2015-11-10 00:50 +0100
[PATCH v2] block/floppy.c: handle blk_register_region() return value Vishnu Pratap Singh <vishnu.ps@samsung.com> - 2015-11-10 04:30 +0100
[PATCH 6/8] md/md.c: handle blk_register_region() return value Vishnu Pratap Singh <vishnu.ps@samsung.com> - 2015-11-06 13:40 +0100
[PATCH 4/8] block/loop.c: handle add_disk() & blk_register_region() return value Vishnu Pratap Singh <vishnu.ps@samsung.com> - 2015-11-06 13:40 +0100
[PATCH 5/8] zram: handle add_disk() & blk_register_region() return value Vishnu Pratap Singh <vishnu.ps@samsung.com> - 2015-11-06 13:40 +0100
Re: [PATCH 5/8] zram: handle add_disk() & blk_register_region() return value Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-09 02:10 +0100
[PATCH 7/8] cdrom/gdrom.c: handle add_disk() return value Vishnu Pratap Singh <vishnu.ps@samsung.com> - 2015-11-06 13:40 +0100
[PATCH 8/8] ide/ide-probe.c: handle blk_register_region() return value Vishnu Pratap Singh <vishnu.ps@samsung.com> - 2015-11-06 13:50 +0100
Re: [PATCH 1/8] block/genhd.c: Add error handling Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-10 04:40 +0100
Re: [PATCH 1/8] block/genhd.c: Add error handling Jens Axboe <axboe@kernel.dk> - 2015-11-10 04:50 +0100
Re: [PATCH 1/8] block/genhd.c: Add error handling Jeff Moyer <jmoyer@redhat.com> - 2015-11-10 15:20 +0100
csiph-web