linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Zefan <lizefan@huawei.com>
To: Alexander Block <ablock84@googlemail.com>
Cc: chandan r <chandanrmail@gmail.com>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: Add code to support file creation time.
Date: Tue, 10 Jul 2012 13:36:25 +0800	[thread overview]
Message-ID: <4FFBBF59.2020505@huawei.com> (raw)
In-Reply-To: <CAB9VWqDBoY877tNh1J6Z=oD0Ao8H1mUPGFb-O93_OPVvCt_A-g@mail.gmail.com>

On 2012/7/5 9:52, Alexander Block wrote:

> On Thu, Jul 5, 2012 at 3:07 AM, Li Zefan <lizefan@huawei.com> wrote:
>> On 2012/7/4 19:04, Alexander Block wrote:
>>
>>> On Wed, Jul 4, 2012 at 9:56 AM, Li Zefan <lizefan@huawei.com> wrote:
>>>> On 2012/7/4 15:18, chandan r wrote:
>>>>
>>>>> This patch adds a new member to the 'struct btrfs_inode' structure to hold
>>>>> the file creation time.
>>>>>
>>>>
>>>>
>>>> Well, how do users use this file creation time? There's no syscall and there's
>>>> no ioctl that exports this information. That xstat syscall hasn't been accepted,
>>>> so you can revise and repost the patch when you see it happens.
>>> In my opinion we should still include this patch. Currently, otime is never even
>>> initialized, having undefined values. If it ever gets possible to
>>> access otime, we
>>> would at least have some inodes with valid otime fields.
>>
>>
>> otime (on disk) is initialized to 0, not some undefined value. But yeah, your point makes
>> some sense, that with this patch we can access valid otime in an old filesystem once we
>> update to a new kernel which has otime support.
> This is true for the inode items found in the root tree. But the inode
> items found in the filesystem trees are not initialized at all. I did
> a fast check by adding printing of the otime field in
> btrfs-debug-tree...and every inode's otime looks random.
> btrfs_new_inode uses btrfs_insert_empty_items which does not zero the
> new item, then fill_inode_item is used to initialize the fields and
> there otime is missing.
> 


That's bad..

  reply	other threads:[~2012-07-10  5:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04  7:18 [PATCH] Btrfs: Add code to support file creation time chandan r
2012-07-04  7:56 ` Li Zefan
2012-07-04 11:04   ` Alexander Block
2012-07-05  1:07     ` Li Zefan
2012-07-05  1:52       ` Alexander Block
2012-07-10  5:36         ` Li Zefan [this message]
2012-09-30  8:13     ` Arne Jansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FFBBF59.2020505@huawei.com \
    --to=lizefan@huawei.com \
    --cc=ablock84@googlemail.com \
    --cc=chandanrmail@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).