Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614596
| From | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" |
| Date | 2017-04-02 00:00 +0200 |
| Message-ID | <trzdT-8ib-1@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <tpXDJ-6Qq-37@gated-at.bofh.it> <tpXNo-6Vx-11@gated-at.bofh.it> <tpZmc-8cB-75@gated-at.bofh.it> <tq0UV-12M-3@gated-at.bofh.it> <tq1Hk-1nl-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 28 Mar 2017, Wols Lists wrote: > What Arnd is doing is commonly called "defensive programming", and > unfortunately reality shows us that it is usually worth its weight in > gold. That's why you put ASSERTs in code - so that if somebody does > something stupid by accident, it blows up. This is just more of the same. You know, BUG_ON(vcnt1 != vcnt2) might address this quite nicely [if you want to go the assert() way, that is!], since __attribute__((noreturn)) is set for the codepath taken when the BUG_ON condition triggers... That said, if there is something less insane to be done than OOPsing when the world has gone strange and vcnt1 != vcnt2, that ought to be a better solution... All of this assumes vcnt1 == vcnt2 is really the only possibily correct situation. -- Henrique Holschuh
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] Revert "md: raid1: use bio helper in process_checks()" Arnd Bergmann <arnd@arndb.de> - 2017-03-28 12:00 +0200
Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" Ming Lei <tom.leiming@gmail.com> - 2017-03-28 12:50 +0200
Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" Arnd Bergmann <arnd@arndb.de> - 2017-03-28 13:40 +0200
Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" Ming Lei <tom.leiming@gmail.com> - 2017-03-28 13:50 +0200
Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" Arnd Bergmann <arnd@arndb.de> - 2017-03-28 15:30 +0200
Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" Ming Lei <tom.leiming@gmail.com> - 2017-03-28 17:10 +0200
Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" Arnd Bergmann <arnd@arndb.de> - 2017-03-28 17:50 +0200
Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" Ming Lei <tom.leiming@gmail.com> - 2017-03-28 18:20 +0200
Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" Wols Lists <antlists@youngman.org.uk> - 2017-03-28 18:00 +0200
Re: [PATCH] Revert "md: raid1: use bio helper in process_checks()" Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2017-04-02 00:00 +0200
csiph-web