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

Problem with time and stat #20

Open
Djabx opened this issue Feb 8, 2018 · 0 comments
Open

Problem with time and stat #20

Djabx opened this issue Feb 8, 2018 · 0 comments

Comments

@Djabx
Copy link

Djabx commented Feb 8, 2018

I'm on a Ubuntu 16.04

And here is my problem:

root:/mnt/root# btrfs sub create test 
Create subvolume './test'
root:/mnt/root# cd test/

root:/mnt/root/test# stat /mnt/root/test
  File: '/mnt/root/test'
  Size: 0         	Blocks: 0          IO Block: 4096   directory
Device: 3eh/62d	Inode: 256         Links: 1
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-02-08 15:55:13.916941738 +0100
Modify: 2018-02-08 15:55:11.144919869 +0100
Change: 2018-02-08 15:55:11.144919869 +0100
 Birth: -

root:/mnt/root/test# touch test_file
root:/mnt/root/test# stat /mnt/root/test
  File: '/mnt/root/test'
  Size: 18        	Blocks: 0          IO Block: 4096   directory
Device: 3eh/62d	Inode: 256         Links: 1
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-02-08 15:55:13.916941738 +0100
Modify: 2018-02-08 15:55:35.401111346 +0100
Change: 2018-02-08 15:55:35.401111346 +0100
 Birth: -

root:/mnt/root/test# mkdir subdir
root:/mnt/root/test# stat /mnt/root/test
  File: '/mnt/root/test'
  Size: 30        	Blocks: 0          IO Block: 4096   directory
Device: 3eh/62d	Inode: 256         Links: 1
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-02-08 15:55:13.916941738 +0100
Modify: 2018-02-08 15:55:46.333197729 +0100
Change: 2018-02-08 15:55:46.333197729 +0100
 Birth: -

root:/mnt/root/test# touch subdir/subfile
root:/mnt/root/test# stat /mnt/root/test
  File: '/mnt/root/test'
  Size: 30        	Blocks: 0          IO Block: 4096   directory
Device: 3eh/62d	Inode: 256         Links: 1
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-02-08 15:55:54.017258478 +0100
Modify: 2018-02-08 15:55:46.333197729 +0100
Change: 2018-02-08 15:55:46.333197729 +0100
 Birth: -

root:/mnt/root/test# btrfs --version
btrfs-progs v4.4

As you can see, I create a sub volume, some directories and some files.

The problem is, if I modifiy a file in a subdirecto, it doest not update the modification date of the subvolume.

The problem is that btrfs-snap -t and btrfs-snap -T use the stat command to know if the snapshot should be done or not.

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

No branches or pull requests

1 participant