Re: [RFC PATCH 19/35] libceph, ceph: Convert users of ceph_pagelist to ceph_databuf

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

 



Viacheslav Dubeyko <Slava.Dubeyko@xxxxxxx> wrote:

> >  		/*
> > -		 * number of encoded locks is stable, so copy to pagelist
> > +		 * number of encoded locks is stable, so copy to databuf
> >  		 */
> >  		struct_len = 2 * sizeof(u32) +
> >  			    (num_fcntl_locks + num_flock_locks) *
> 
> I think we have too many mysterious equations in CephFS code. :)

That's not particularly a function of these patches.

> > -		err = ceph_pagelist_reserve(pagelist,
> > -					    sizeof(u64) + sizeof(u32) +
> > -					    pathlen + sizeof(rec.v1));
> > +		err = ceph_databuf_reserve(dbuf,
> > +					   sizeof(u64) + sizeof(u32) +
> > +					   pathlen + sizeof(rec.v1),
> > +					   GFP_NOFS);
> 
> Yeah, another mysterious calculation. Why do we add sizeof(u64) and
> sizeof(u32) here?

Protocol element space.

David





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux