Bug 216010 - kafs client don't notice that file has changed when using "git status"
Summary: kafs client don't notice that file has changed when using "git status"
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-20 20:19 UTC by Markus Suvanto
Modified: 2022-05-24 20:00 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.18.0-rc7
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Markus Suvanto 2022-05-20 20:19:01 UTC
Reproducer:

1) openafs client:
cd /afs/station.com/tmp 
mkdir foo
cd foo
git init
echo "hello" > hello.txt
git add hello.txt
git commit -m "hello"

git status
On branch master
nothing to commit, working tree clean

2) kafs client:
cd /afs/station.com/tmp/foo

git status
On branch master
nothing to commit, working tree clean

3) openafs client:
echo hello2 >> hello.txt
git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   hello.txt


4) kafs client:

git status
On branch master
nothing to commit, working tree clean


But after I use that file, for example
cat hello.txt 
hello
hello2

git status

On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   hello.txt
Comment 1 David Howells 2022-05-20 20:49:16 UTC
What kernel version are you using?
Comment 2 Markus Suvanto 2022-05-20 20:53:08 UTC
uname -a
Linux test.station.com 5.18.0-rc7
Comment 3 David Howells 2022-05-24 09:22:37 UTC
This should be fixed by:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2aeb8c86d49967552394d5e723f87454cb53f501

afs: Fix afs_getattr() to refetch file status if callback break occurred

Note You need to log in before you can comment on or make changes to this bug.