Re: assert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 24 Aug 2016, Casey Bodley wrote:
> On 08/24/2016 11:45 AM, Adam C. Emerson wrote:
> > On 24/08/2016, Matt Benjamin wrote:
> > > Mark Nelson called attention to this topic again yesterday in #ceph-devel.
> > > 
> > > We favor retaining the ability to re-declare specific asserts such that
> > > they are, as with assert in general historically, compiled out.  I think
> > > it's reasonable if this is a marked case.
> > > 
> > > That seems to imply that if ceph_assert is the unmarked case, it won't be
> > > compiled out, so is essentially ceph_assert_always, as below (or else that
> > > form should be used...it's a little long).
> > If we want to go for brevity, we could have ceph_assert() be the
> > unmarked case that functions just like assert macro.
> > 
> > Then we could use something like ceph_demand() (ceph_ultimatum?
> > ceph_blackmail?) to indicate the case that isn't compiled out.
> > 
> > Personally, I would just like to get rid of Ceph's assert.h and its
> > unending war with every other header file in the world. At one point
> > killed off the header and linked in an object that overrode
> > __assert_fail. This worked very well, though it would require handling
> > every C library implementation we're compiled against.
> > 
> 
> I dug up an old commit as an example of overriding libc's __assert_fail()
> function, which would allow us to use the system's assert.h as is:
> https://github.com/cohortfsllc/cohortfs-ceph/commit/40956ad3661192462246ed7e5435522c5708ffbc

Oh, this looks nice.

In that case, we still need a ceph_abort (and an associated cleanup).

I think we also still need some distinction between asserts that are safe 
to compile out and those that are not, though.

sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux