Question regarding struct ceph_timestamp

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

 



Hi,

While analysing an xfstest failure (generic/258) I had to look at the
definition of struct ceph_timespec.  And I was surprised to verify that
both its fields (tv_sec and tv_nsec) are 32-bits (__le32).  And I believe
that this explains the test failure, as ceph_encode_timespec() would fail
to convert the negative pre-epoch value (-315615540 => 3979351756).

The failure can be easily reproduced by simply creating a test file in a
cephfs mount with:

 $ touch -t 196001010101 /mnt/testfile
 $ ls -l /mnt/testfile
 -rw-r--r-- 1 root 0 0 Jan  1  1960 testfile

After remounting the filesystem:

 $ ls -l /mnt/testfile
 -rw-r--r-- 1 root 0 0 Feb  6  2096 testfile

Am I missing something?  If I'm not (and I probably am!), this isn't just
a client-side issue and fixing it will require touching several other
parts of the code.

Cheers,
--
Luís
--
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