Re: Make libcephfs return error when unmounted?

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

On Wed, Apr 11, 2012 at 3:13 PM, Greg Farnum
<gregory.farnum@xxxxxxxxxxxxx> wrote:
> On Wednesday, April 11, 2012 at 2:59 PM, Noah Watkins wrote:
>> On Apr 11, 2012, at 11:22 AM, Yehuda Sadeh Weinraub wrote:
>> > Also need to check that cmount is initialized. I'd add a helper:
>> >
>> > Client *ceph_get_client(struct ceph_mount_info *cmont)
>> > {
>> > if (cmount && cmount->is_mounted())
>> > return cmount->get_client();
>> >
>> > return NULL;
>> > }
>> How useful is checking cmount != NULL here? This defensive check depends on users initializing their cmount pointers to NULL, but the API doesn't do anything to require this initialization assumption.
>> - Noah
> I had a whole email going until I realized you were just right. So, yeah, that wouldn't do anything since a cmount they forgot to have the API initialize is just going to hold random data. Urgh.

There's no destructor either, maybe it's a good time to add one?

To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[CEPH Users]     [Information on CEPH]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux