Re: [PATCH] ceph: use the OSD time as the object mtime instead of the client time

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

 



On Tue, Jul 29, 2014 at 11:46 AM, Sage Weil <sweil@xxxxxxxxxx> wrote:
> On Tue, 29 Jul 2014, Wang, Zhiqiang wrote:
>> This fixes a bug when the time of the OSDs and clients are not synchronized
>> (especially when client is ahead of OSD), and the cache tier dirty ratio
>> reaches the threshold, the agent skips the flush work because it thinks
>> the object is too young.
>>
>> The skipping flush code is as following:
>>
>>   if (obc->obs.oi.mtime + utime_t(pool.info.cache_min_flush_age, 0) > now) {
>>     dout(20) << __func__ << " skip (too young) " << obc->obs.oi << dendl;
>>     osd->logger->inc(l_osd_agent_skip);
>>     return false;
>>   }
>
> Hmm, I think the use of the client mtime is an important property we want
> to maintain for the benefit of the rest of the system.  Two other
> possibilities:

This was my initial thought as well — but I don't think we're actually
relying on that any more (e.g., we used to use the client times for
file recovery in the MDS, but the rest of CephFS is now using MDS
times anyway). Are there scenarios other than CephFS recovery?

>
> 1) If cache_min_flush_age is 0, skip the check, so we avoid mtimes in the
> future in that case.
>
> 2) Add an additional field to object_info_t that is an mtime based on the
> OSD's clock, and use that for these checks.

But option 2 is probably still a good idea.
-Greg
--
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