Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement File modified time #95

Closed
martinsmmm opened this issue Feb 13, 2018 · 11 comments
Closed

Implement File modified time #95

martinsmmm opened this issue Feb 13, 2018 · 11 comments

Comments

@martinsmmm
Copy link

Thanks for making the fuse driver.

Any chance to provide some update about 'if' and 'when' the attributes will be available ? What is the plan ?

We are particularly interested in file modification time.

Some file system APIs have not been implemented: readlink, symlink, link, chmod, chown, fsync, lock and extended attribute calls.

Thank you!

@seguler
Copy link

seguler commented Feb 13, 2018

File modification time is already available. Isn't it ? You should see last modified time of the blob when you list files.

One exception is when you open a file, then you will start seeing the time when the file got downloaded to your machine because you are essentially working on a copy of the blob on your machine until you close the file.

@cvalla
Copy link

cvalla commented Feb 13, 2018

Hello and thank you for your great job.
Files date attribute are all set to 1 gen 1970 when you mount the azure storage.
On Ubuntu 16.04 Installed blobfuse from the microsoft deb repository yesterday.
mounted azure blob on /azure path (with /mnt/azuretmp temp path) using root user.

ls -latr command output issued by root is like:

-rwxrwx--- 1 root root 858680 gen 1 1970 FILE1.zip
-rwxrwx--- 1 root root 1001214 gen 1 1970 FILE2.zip

@seguler
Copy link

seguler commented Feb 13, 2018

Oh you are right. I was confused. We implemented timestamp support in this PR #29 but never merged... We should implement this.

@seguler seguler changed the title File modified time Implement File modified time Feb 13, 2018
@seguler
Copy link

seguler commented Feb 18, 2018

I have implemented this in PR #102 - I am not sure if this PR will make to a release, but test and let us know here.

One caveat is that files timestamps are retrieved from Blob Last-Modified time, however for directories there is no last-modified time on Blob storage. So I am showing the time of list operation for directories.

@martinsmmm
Copy link
Author

Hi @seguler / all,
Sorry for slow response - get sick last week. Great news!

I will test it during tomorrow and share results. As per your description this is what we are looking for.

Our use case is: We are using Blobstorage as backend/storage for FTP solution. In some cases we need attributes to know which files (luckily not directories) are new (since 'last time') for processing pipeline (Hello Biztalk).

Thank you,
Martin

@martinsmmm
Copy link
Author

Hi all,
Tested the PR #102 .

The attributes are showing correctly. Thanks @seguler

root@xxx:/xxx/xxx/xxx/xxxtest# ls -la
total 0
drwxrwx--- 3 root root       4096 Feb 20 03:24 .
drwxrwx--- 3 root root       4096 Feb 20 03:24 ..
-rwxrwx--- 1 root root   10485760 Feb  5 03:45 10MB.zip
drwxrwx--- 3 root root       4096 Feb 20 03:24 380855
-rwxrwx--- 1 root root 3006922752 Feb  9 20:02 box-disk1.vmdk
-rwxrwx--- 1 root root          0 Feb  5 03:45 empty-file.txt
drwxrwx--- 3 root root       4096 Feb 20 03:24 test
-rwxrwx--- 1 root root          0 Feb  5 03:46 testfile

1970 is gone (#95 (comment)).

We will await merge / release.

Huge Thanks!
Martin

@martinsmmm
Copy link
Author

Just additional note for folders modification time.

Would it be possible to re-use the information which is displayed on Azure portal UI as '.directory' ?
See the modified column on screenshots.

Maybe, this is possibly overlooked low hanging fruit. (?)

Thanks,
Martin

screenshot from 2018-02-22 00-12-11
screenshot from 2018-02-22 00-12-02
screenshot from 2018-02-22 00-11-50

@seguler
Copy link

seguler commented Feb 26, 2018

This makes sense! I'll look into the feasibility in the code

@seguler
Copy link

seguler commented Feb 28, 2018

So - I wanna leave the directory timestamps to later... Currently we do not check the existence of .directory file and instead do list_blobs with the prefix to determine if a directory exists or not. Because of this, the code is not very suitable to report the directory timestamps at the moment.

Will keep this issue open until we figure out a way to report directory timestamps properly.

@seguler
Copy link

seguler commented Mar 2, 2018

I'll close this as File modified time is implemented in blobfuse 0.3. Will open another one for directory timestamps.

@seguler seguler closed this as completed Mar 2, 2018
@hafizullah
Copy link

@seguler is there a PR open for the directory timestamp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants