weird bash autocomplete issue
Quoted 2 lines · Roland
Quoted 1 line
i have come across a weird autocomplete issue i assume it is relate=
d to
Quoted 8 lines
Quoted 8 lines
btrfs.
let`s have some dirs:
/non-btrfs-mount
./linux
./testdir
Quoted 5 lines
Quoted 5 lines
/brtfs-mount
./linux
./testdirnow, if i do "cd t<tab>" in /non-btrfs-mount, "t" autocompletes to =
"testdir"
Quoted 3 lines
Quoted 3 lines
same for l<tab>inux - bash autocompletes as expected.
now, the weird thing is, that on /btrfs-mount this behaves differen=
t.
Quoted 6 lines
Quoted 4 lines
autocompletion for testdir works, but not for linux dir. weird.
can someone reproduce this ?
=20
Open another shell, find the bash process pid of the first shell with=
:
Quoted 5 lines
ps afx
and do:
strace -p <pid>
Go back to the first shell, hit <tab>, and the trace should show what's going on. You see a significant difference there?
ok, here we go (i hope i did not cut important parts).
i don`t see the real issue, but i did another interesting finding - see=
below
bad (cd l<tab>):
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) =3D 3 fstat64(3, {st_dev=3Dmakedev(0, 19), st_ino=3D256, st_mode=3DS_IFDIR|05= 55, st_nlink=3D1, st_uid=3D0, st_gid=3D0, st_blksize=3D4096, st_blocks=3D= 8, st_size=3D18, st_atime=3D2008/12/16-21:32:38, st_mtime=3D2008/12/16-= 21:32:37, st_ctime=3D2008/12/16-21:32:37}) =3D 0
getdents64(3, {{d_ino=3D256, d_off=3D2, d_type=3DDT_DIR, d_reclen=3D24,=
d_name=3D"."} {d_ino=3D256, d_off=3D2, d_type=3DDT_DIR, d_reclen=3D24,= d_name=3D".."} {d_ino=3D257, d_off=3D3, d_type=3DDT_DIR, d_reclen=3D24=
, d_name=3D"test"} {d_ino=3D258, d_off=3D9223372036854775807, d_type=3D= DT_DIR, d_reclen=3D32, d_name=3D"linux"}}, 4096) =3D 104_llseek(3, 3, [3], SEEK_SET) =3D 0
getdents64(3, {{d_ino=3D258, d_off=3D9223372036854775807, d_type=3DDT_D= IR, d_reclen=3D32, d_name=3D"linux"}}, 4096) =3D 32
close(3) =3D 0 write(2, "\7", 1) =3D 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) =3D 0
good (cd t<tab>):
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) =3D 3 fstat64(3, {st_dev=3Dmakedev(0, 19), st_ino=3D256, st_mode=3DS_IFDIR|05= 55, st_nlink=3D1, st_uid=3D0, st_gid=3D0, st_blksize=3D4096, st_blocks=3D= 8, st_size=3D18, st_atime=3D2008/12/16-21:38:13, st_mtime=3D2008/12/16-= 21:38:11, st_ctime=3D2008/12/16-21:38:11}) =3D 0
getdents64(3, {{d_ino=3D256, d_off=3D2, d_type=3DDT_DIR, d_reclen=3D24,=
d_name=3D"."} {d_ino=3D256, d_off=3D2, d_type=3DDT_DIR, d_reclen=3D24,= d_name=3D".."} {d_ino=3D257, d_off=3D3, d_type=3DDT_DIR, d_reclen=3D24=
, d_name=3D"test"} {d_ino=3D258, d_off=3D9223372036854775807, d_type=3D= DT_DIR, d_reclen=3D32, d_name=3D"linux"}}, 4096) =3D 104_llseek(3, 3, [3], SEEK_SET) =3D 0
getdents64(3, {{d_ino=3D258, d_off=3D9223372036854775807, d_type=3DDT_D= IR, d_reclen=3D32, d_name=3D"linux"}}, 4096) =3D 32
close(3) =3D 0
stat64("test", {st_dev=3Dmakedev(0, 19), st_ino=3D257, st_mode=3DS_IFDI= R|0755, st_nlink=3D1, st_uid=3D0, st_gid=3D0, st_blksize=3D4096, st_blo= cks=3D0, st_size=3D0, st_atime=3D2008/12/16-21:15:29, st_mtime=3D2008/1= 2/16-21:15:29, st_ctime=3D2008/12/16-21:15:29}) =3D 0 stat64("test", {st_dev=3Dmakedev(0, 19), st_ino=3D257, st_mode=3DS_IFDI= R|0755, st_nlink=3D1, st_uid=3D0, st_gid=3D0, st_blksize=3D4096, st_blo= cks=3D0, st_size=3D0, st_atime=3D2008/12/16-21:15:29, st_mtime=3D2008/1= 2/16-21:15:29, st_ctime=3D2008/12/16-21:15:29}) =3D 0write(2, "est/", 4) =3D 4rt_sigprocmask(SIG_BLOCK, NULL, [], 8) =3D 0
and now, after adding a file to that dir with "touch abcd", for my curi= ousity this makes "cd l<tab>" work again.
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) =3D 3 fstat64(3, {st_dev=3Dmakedev(0, 19), st_ino=3D256, st_mode=3DS_IFDIR|05= 55, st_nlink=3D1, st_uid=3D0, st_gid=3D0, st_blksize=3D4096, st_blocks=3D= 8, st_size=3D26, st_atime=3D2008/12/16-21:34:45, st_mtime=3D2008/12/16-= 21:34:44, st_ctime=3D2008/12/16-21:34:44}) =3D 0
getdents64(3, {{d_ino=3D256, d_off=3D2, d_type=3DDT_DIR, d_reclen=3D24,=
d_name=3D"."} {d_ino=3D256, d_off=3D2, d_type=3DDT_DIR, d_reclen=3D24,= d_name=3D".."} {d_ino=3D257, d_off=3D3, d_type=3DDT_DIR, d_reclen=3D24=
, d_name=3D"test"} {d_ino=3D258, d_off=3D17, d_type=3DDT_DIR, d_reclen=3D= 32, d_name=3D"linux"} {d_ino=3D272, d_off=3D9223372036854775807, d_type= =3DDT_REG, d_reclen=3D24, d_name=3D"abcd"}}, 4096) =3D 128_llseek(3, 17, [17], SEEK_SET) =3D 0
getdents64(3, {{d_ino=3D272, d_off=3D9223372036854775807, d_type=3DDT_R= EG, d_reclen=3D24, d_name=3D"abcd"}}, 4096) =3D 24
close(3) =3D 0
stat64("linux", {st_dev=3Dmakedev(0, 19), st_ino=3D258, st_mode=3DS_IFD= IR|0755, st_nlink=3D1, st_uid=3D0, st_gid=3D0, st_blksize=3D4096, st_bl= ocks=3D0, st_size=3D0, st_atime=3D2008/12/16-21:15:33, st_mtime=3D2008/= 12/16-21:15:33, st_ctime=3D2008/12/16-21:15:33}) =3D 0 stat64("linux", {st_dev=3Dmakedev(0, 19), st_ino=3D258, st_mode=3DS_IFD= IR|0755, st_nlink=3D1, st_uid=3D0, st_gid=3D0, st_blksize=3D4096, st_bl= ocks=3D0, st_size=3D0, st_atime=3D2008/12/16-21:15:33, st_mtime=3D2008/= 12/16-21:15:33, st_ctime=3D2008/12/16-21:15:33}) =3D 0write(2, "inux/", 5) =3D 5rt_sigprocmask(SIG_BLOCK, NULL, [], 8) =3D 0
regards
roland
_______________________________________________________________________
T=E4glich 1.000.000 Euro gewinnen! Jetzt kostenlos WEB.DE MillionenKlic= k=20
spielen! https://millionenklick.web.de/[email protected]@home
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 42 lines · On Tue, Dec 16, 2008 at 21:46, <[email protected]> wrote:
Quoted 21 lines · Roland
Quoted 20 lines
i have come across a weird autocomplete issue i assume it is related to btrfs.
let`s have some dirs:
/non-btrfs-mount
./linux
./testdir/brtfs-mount
./linux
./testdirnow, if i do "cd t<tab>" in /non-btrfs-mount, "t" autocompletes to "testdir" same for l<tab>inux - bash autocompletes as expected.
now, the weird thing is, that on /btrfs-mount this behaves different.
autocompletion for testdir works, but not for linux dir. weird.
Quoted 8 lines
Quoted 1 line
can someone reproduce this ?
Open another shell, find the bash process pid of the first shell with:
ps afx
and do:
strace -p <pid>
Go back to the first shell, hit <tab>, and the trace should show what's going on. You see a significant difference there?ok, here we go (i hope i did not cut important parts).
i don`t see the real issue, but i did another interesting finding - see belowbad (cd l<tab>):
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC)= 3
fstat64(3, {st_dev=makedev(0, 19), st_ino=256, st_mode=S_IFDIR|0555, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=18, st_atime=2008/12/16-21:32:38, st_mtime=2008/12/16-21:32:37, st_ctime=2008/12/16-21:32:37}) = 0 getdents64(3, {{d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name=".."} {d_ino=257, d_off=3, d_type=DT_DIR, d_reclen=24, d_name="test"} {d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32, d_name="linux"}}, 4096) = 104_llseek(3, 3, [3], SEEK_SET)= 0getdents64(3, {{d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32, d_name="linux"}}, 4096)= 32
Quoted 1 line · On Tue, Dec 16, 2008 at 22:26, <[email protected]> wrote:
i assume it has something to do with the large value for
d_offof the last dirent ?
Looks like, 9223372036854775807 is just LLONG_MAX.
Kay
Quoted 44 lines · Kay Sievers
Quoted 35 lines · On Tue, Dec 16, 2008 at 21:46, <[email protected]> wrote:
Quoted 21 lines · Roland
Quoted 20 lines
i have come across a weird autocomplete issue i assume it is related to btrfs.
let`s have some dirs:
/non-btrfs-mount
./linux
./testdir/brtfs-mount
./linux
./testdirnow, if i do "cd t<tab>" in /non-btrfs-mount, "t" autocompletes to "testdir" same for l<tab>inux - bash autocompletes as expected.
now, the weird thing is, that on /btrfs-mount this behaves different.
autocompletion for testdir works, but not for linux dir. weird.
Quoted 8 lines
Quoted 1 line
can someone reproduce this ?
Open another shell, find the bash process pid of the first shell with:
ps afx
and do:
strace -p <pid>
Go back to the first shell, hit <tab>, and the trace should show what's going on. You see a significant difference there?ok, here we go (i hope i did not cut important parts).
i don`t see the real issue, but i did another interesting finding - see belowQuoted 7 lines
bad (cd l<tab>):
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC)= 3
fstat64(3, {st_dev=makedev(0, 19), st_ino=256, st_mode=S_IFDIR|0555, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=18, st_atime=2008/12/16-21:32:38, st_mtime=2008/12/16-21:32:37, st_ctime=2008/12/16-21:32:37}) = 0 getdents64(3, {{d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name=".."} {d_ino=257, d_off=3, d_type=DT_DIR, d_reclen=24, d_name="test"} {d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32, d_name="linux"}}, 4096) = 104_llseek(3, 3, [3], SEEK_SET)= 0getdents64(3, {{d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32, d_name="linux"}}, 4096)= 32
Quoted 4 lines
Quoted 1 line · On Tue, Dec 16, 2008 at 22:26, <[email protected]> wrote:
i assume it has something to do with the large value for
d_offof the last dirent ?Looks like, 9223372036854775807 is just
LLONG_MAX.
I can not reproduce that (on openSUSE 11.1). I also don't see the _llseek() calls.
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fstat(3, {st_dev=makedev(0, 18), ...
getdents64(3, {
{d_ino=260, d_off=2, d_type=DT_DIR, d_reclen=24, d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name=".."} {d_ino=261, d_off=3, d_type=DT_REG, d_reclen=24, d_name="a"} {d_ino=262, d_off=4, d_type=DT_REG, d_reclen=24, d_name="b"} {d_ino=263, d_off=5, d_type=DT_REG, d_reclen=24, d_name="c"} {d_ino=264, d_off=6, d_type=DT_DIR, d_reclen=24, d_name="test"} {d_ino=265, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32, d_name="linux"}
}, 4096) = 176getdents64(3, {}, 4096) = 0
close(3)
This is with today's git kernel and today's standalone btrfs unstable.
You are using the distro kernel and compile the standalone btrfs module?
Kay
Quoted 45 lines · Kay Sievers
Quoted 44 lines · On Tue, Dec 16, 2008 at 21:46, <[email protected]> wrote:
Quoted 42 lines
Quoted 21 lines · Roland
Quoted 20 lines
i have come across a weird autocomplete issue i assume it is related to btrfs.
let`s have some dirs:
/non-btrfs-mount
./linux
./testdir/brtfs-mount
./linux
./testdirnow, if i do "cd t<tab>" in /non-btrfs-mount, "t" autocompletes to "testdir" same for l<tab>inux - bash autocompletes as expected.
now, the weird thing is, that on /btrfs-mount this behaves different.
autocompletion for testdir works, but not for linux dir. weird.
Quoted 8 lines
Quoted 1 line
can someone reproduce this ?
Open another shell, find the bash process pid of the first shell with:
ps afx
and do:
strace -p <pid>
Go back to the first shell, hit <tab>, and the trace should show what's going on. You see a significant difference there?ok, here we go (i hope i did not cut important parts).
i don`t see the real issue, but i did another interesting finding - see belowbad (cd l<tab>):
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC)= 3
fstat64(3, {st_dev=makedev(0, 19), st_ino=256, st_mode=S_IFDIR|0555, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=18, st_atime=2008/12/16-21:32:38, st_mtime=2008/12/16-21:32:37, st_ctime=2008/12/16-21:32:37}) = 0 getdents64(3, {{d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name=".."} {d_ino=257, d_off=3, d_type=DT_DIR, d_reclen=24, d_name="test"} {d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32, d_name="linux"}}, 4096) = 104_llseek(3, 3, [3], SEEK_SET)= 0getdents64(3, {{d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32, d_name="linux"}}, 4096)= 32
Quoted 7 lines
Quoted 4 lines · On Tue, Dec 16, 2008 at 22:26, <[email protected]> wrote:
Quoted 1 line
i assume it has something to do with the large value for
d_offof the last dirent ?Looks like, 9223372036854775807 is just
LLONG_MAX.I can not reproduce that (on openSUSE 11.1). I also don't see the
_llseek()calls.
weird. no btrfs issue then !?
Quoted 16 lines
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)= 3 fstat(3, {st_dev=makedev(0, 18), ...
getdents64(3, {
{d_ino=260, d_off=2, d_type=DT_DIR, d_reclen=24, d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name=".."} {d_ino=261, d_off=3, d_type=DT_REG, d_reclen=24, d_name="a"} {d_ino=262, d_off=4, d_type=DT_REG, d_reclen=24, d_name="b"} {d_ino=263, d_off=5, d_type=DT_REG, d_reclen=24, d_name="c"} {d_ino=264, d_off=6, d_type=DT_DIR, d_reclen=24, d_name="test"} {d_ino=265, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32,
d_name="linux"}
}, 4096) = 176getdents64(3, {}, 4096)= 0
close(3)
Quoted 3 lines
This is with today's git kernel and today's standalone btrfs unstable.
You are using the distro kernel and compile the standalone btrfs module?
yes.
to be honest, i`m slightly newer than 11.1 (did zypper dup to latest factory some days ago)
linux:~ # bash -version
GNU bash, version 3.2.39(1)-release (i586-suse-linux-gnu) Copyright (C) 2007 Free Software Foundation, Inc.
roland
Quoted 89 lines · Roland
Quoted 58 lines · Kay Sievers
Quoted 57 lines · On Tue, Dec 16, 2008 at 21:46, <[email protected]> wrote:
Quoted 54 lines
Quoted 24 lines · Roland
Quoted 23 lines
i have come across a weird autocomplete issue i assume it is related
Quoted 1 line
Quoted 1 line
Quoted 1 line
to
btrfs.
let`s have some dirs:
/non-btrfs-mount
./linux
./testdir/brtfs-mount
./linux
./testdirnow, if i do "cd t<tab>" in /non-btrfs-mount, "t" autocompletes to
Quoted 1 line
Quoted 1 line
Quoted 1 line
"testdir"
same for l<tab>inux - bash autocompletes as expected.
now, the weird thing is, that on /btrfs-mount this behaves >> > different.
autocompletion for testdir works, but not for linux dir. weird.
Quoted 8 lines
Quoted 1 line
can someone reproduce this ?
Open another shell, find the bash process pid of the first shell with:
ps afx
and do:
strace -p <pid>
Go back to the first shell, hit <tab>, and the trace should show what's going on. You see a significant difference there?ok, here we go (i hope i did not cut important parts).
i don`t see the real issue, but i did another interesting finding - seeQuoted 1 line
below
bad (cd l<tab>):
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC)= 3 fstat64(3, {st_dev=makedev(0, 19), st_ino=256, st_mode=S_IFDIR|0555, > st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, > st_size=18, st_atime=2008/12/16-21:32:38, st_mtime=2008/12/16-21:32:37, > st_ctime=2008/12/16-21:32:37}) = 0
getdents64(3, {{d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, > d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, > d_name=".."} {d_ino=257, d_off=3, d_type=DT_DIR, d_reclen=24, > d_name="test"} {d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, > d_reclen=32, d_name="linux"}}, 4096) = 104_llseek(3, 3, [3], SEEK_SET)= 0getdents64(3, {{d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, > d_reclen=32, d_name="linux"}}, 4096)= 32Quoted 8 lines
Quoted 5 lines · On Tue, Dec 16, 2008 at 22:26, <[email protected]> wrote:
Quoted 2 lines
i assume it has something to do with the large value for
d_offof the > last dirent ?Looks like, 9223372036854775807 is just
LLONG_MAX.I can not reproduce that (on openSUSE 11.1). I also don't see the
_llseek()calls.weird. no btrfs issue then !?
Quoted 16 lines
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)= 3 fstat(3, {st_dev=makedev(0, 18), ...
getdents64(3, {
{d_ino=260, d_off=2, d_type=DT_DIR, d_reclen=24, d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name=".."} {d_ino=261, d_off=3, d_type=DT_REG, d_reclen=24, d_name="a"} {d_ino=262, d_off=4, d_type=DT_REG, d_reclen=24, d_name="b"} {d_ino=263, d_off=5, d_type=DT_REG, d_reclen=24, d_name="c"} {d_ino=264, d_off=6, d_type=DT_DIR, d_reclen=24, d_name="test"} {d_ino=265, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32,
d_name="linux"}
}, 4096) = 176getdents64(3, {}, 4096)= 0
close(3)Quoted 3 lines
This is with today's git kernel and today's standalone btrfs unstable.
You are using the distro kernel and compile the standalone btrfs module?
Quoted 7 lines
yes.
to be honest, i`m slightly newer than 11.1 (did zypper dup to latest factory some days ago)linux:~ # bash -version
GNU bash, version 3.2.39(1)-release (i586-suse-linux-gnu) Copyright (C) 2007 Free Software Foundation, Inc.
That is still the same bash, the one you use is a 32bit version. Do you run a 32 bit kernel too? I could try that on a 32 bit box then.
Thanks,
Kay
Quoted 52 lines · Kay Sievers
Quoted 51 lines · Roland
Quoted 16 lines · Kay Sievers
Quoted 15 lines
Quoted 14 lines
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC)= 3 fstat64(3, {st_dev=makedev(0, 19), st_ino=256, st_mode=S_IFDIR|0555, > st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, > st_size=18, st_atime=2008/12/16-21:32:38, st_mtime=2008/12/16-21:32:37, > st_ctime=2008/12/16-21:32:37}) = 0
getdents64(3, {{d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, > d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, > d_name=".."} {d_ino=257, d_off=3, d_type=DT_DIR, d_reclen=24, > d_name="test"} {d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, > d_reclen=32, d_name="linux"}}, 4096) = 104_llseek(3, 3, [3], SEEK_SET)= 0getdents64(3, {{d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, > d_reclen=32, d_name="linux"}}, 4096)= 32Quoted 8 lines
Quoted 5 lines · On Tue, Dec 16, 2008 at 22:26, <[email protected]> wrote:
Quoted 2 lines
i assume it has something to do with the large value for
d_offof the > last dirent ?Looks like, 9223372036854775807 is just
LLONG_MAX.I can not reproduce that (on openSUSE 11.1). I also don't see the
_llseek()calls.weird. no btrfs issue then !?
Quoted 16 lines
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)= 3 fstat(3, {st_dev=makedev(0, 18), ...
getdents64(3, {
{d_ino=260, d_off=2, d_type=DT_DIR, d_reclen=24, d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name=".."} {d_ino=261, d_off=3, d_type=DT_REG, d_reclen=24, d_name="a"} {d_ino=262, d_off=4, d_type=DT_REG, d_reclen=24, d_name="b"} {d_ino=263, d_off=5, d_type=DT_REG, d_reclen=24, d_name="c"} {d_ino=264, d_off=6, d_type=DT_DIR, d_reclen=24, d_name="test"} {d_ino=265, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32,
d_name="linux"}
}, 4096) = 176getdents64(3, {}, 4096)= 0
close(3)Quoted 3 lines
This is with today's git kernel and today's standalone btrfs unstable.
You are using the distro kernel and compile the standalone btrfs module?
yes.
to be honest, i`m slightly newer than 11.1 (did zypper dup to latest factory some days ago)
Quoted 6 lines
Quoted 3 lines
linux:~ # bash -version
GNU bash, version 3.2.39(1)-release (i586-suse-linux-gnu) Copyright (C) 2007 Free Software Foundation, Inc.That is still the same bash, the one you use is a 32bit version. Do you run a 32 bit kernel too? I could try that on a 32 bit box then.
At least on my 32 bit box, tab completion works fine. But, the d_off of LLONG_MAX comes from btrfs_readdir(). Git had a feature where it would loop infinitely over a directory in some cases and this was my workaround.
This should be fixed in git by now, so I can drop it if that really is causing problems in bash.
-chris
Quoted 53 lines · Chris Mason
Quoted 52 lines · Kay Sievers
Quoted 51 lines · Roland
Quoted 16 lines · Kay Sievers
Quoted 15 lines
Quoted 14 lines
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC)= 3 fstat64(3, {st_dev=makedev(0, 19), st_ino=256, st_mode=S_IFDIR|0555, > st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, > st_size=18, st_atime=2008/12/16-21:32:38, st_mtime=2008/12/16-21:32:37, > st_ctime=2008/12/16-21:32:37}) = 0
getdents64(3, {{d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, > d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, > d_name=".."} {d_ino=257, d_off=3, d_type=DT_DIR, d_reclen=24, > d_name="test"} {d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, > d_reclen=32, d_name="linux"}}, 4096) = 104_llseek(3, 3, [3], SEEK_SET)= 0getdents64(3, {{d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, > d_reclen=32, d_name="linux"}}, 4096)= 32Quoted 8 lines
Quoted 5 lines · On Tue, Dec 16, 2008 at 22:26, <[email protected]> wrote:
Quoted 2 lines
i assume it has something to do with the large value for
d_offof the > last dirent ?Looks like, 9223372036854775807 is just
LLONG_MAX.I can not reproduce that (on openSUSE 11.1). I also don't see the
_llseek()calls.weird. no btrfs issue then !?
Quoted 16 lines
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)= 3 fstat(3, {st_dev=makedev(0, 18), ...
getdents64(3, {
{d_ino=260, d_off=2, d_type=DT_DIR, d_reclen=24, d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name=".."} {d_ino=261, d_off=3, d_type=DT_REG, d_reclen=24, d_name="a"} {d_ino=262, d_off=4, d_type=DT_REG, d_reclen=24, d_name="b"} {d_ino=263, d_off=5, d_type=DT_REG, d_reclen=24, d_name="c"} {d_ino=264, d_off=6, d_type=DT_DIR, d_reclen=24, d_name="test"} {d_ino=265, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32,
d_name="linux"}
}, 4096) = 176getdents64(3, {}, 4096)= 0
close(3)Quoted 3 lines
This is with today's git kernel and today's standalone btrfs unstable.
You are using the distro kernel and compile the standalone btrfs module?
yes.
to be honest, i`m slightly newer than 11.1 (did zypper dup to latest factory some days ago)
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
linux:~ # bash -version
GNU bash, version 3.2.39(1)-release (i586-suse-linux-gnu) Copyright (C) 2007 Free Software Foundation, Inc.That is still the same bash, the one you use is a 32bit version. Do you run a 32 bit kernel too? I could try that on a 32 bit box then.
At least on my 32 bit box, tab completion works fine.
It works fine here too on 64 bit. I'll try with openSUSE 11.1 on a 32bit box later tonight.
Quoted 4 lines
But, the
d_offofLLONG_MAXcomes frombtrfs_readdir(). Git had a feature where it would loop infinitely over a directory in some cases and this was my workaround.
There are other filesystems doing the same, usually with 32bit int max instead of 64 bit int max, I guess that should work fine.
Quoted 2 lines
This should be fixed in git by now, so I can drop it if that really is causing problems in bash.
I'll come back if I can reproduce it with the same environment Roland is using.
Kay
Quoted 71 lines · Kay Sievers
Quoted 53 lines · Chris Mason
Quoted 52 lines · Kay Sievers
Quoted 51 lines · Roland
Quoted 16 lines · Kay Sievers
Quoted 15 lines
Quoted 14 lines
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC)= 3 fstat64(3, {st_dev=makedev(0, 19), st_ino=256, st_mode=S_IFDIR|0555, > st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, > st_size=18, st_atime=2008/12/16-21:32:38, st_mtime=2008/12/16-21:32:37, > st_ctime=2008/12/16-21:32:37}) = 0
getdents64(3, {{d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, > d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, > d_name=".."} {d_ino=257, d_off=3, d_type=DT_DIR, d_reclen=24, > d_name="test"} {d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, > d_reclen=32, d_name="linux"}}, 4096) = 104_llseek(3, 3, [3], SEEK_SET)= 0getdents64(3, {{d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, > d_reclen=32, d_name="linux"}}, 4096)= 32Quoted 8 lines
Quoted 5 lines · On Tue, Dec 16, 2008 at 22:26, <[email protected]> wrote:
Quoted 2 lines
i assume it has something to do with the large value for
d_offof the > last dirent ?Looks like, 9223372036854775807 is just
LLONG_MAX.I can not reproduce that (on openSUSE 11.1). I also don't see the
_llseek()calls.weird. no btrfs issue then !?
Quoted 16 lines
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)= 3 fstat(3, {st_dev=makedev(0, 18), ...
getdents64(3, {
{d_ino=260, d_off=2, d_type=DT_DIR, d_reclen=24, d_name="."} {d_ino=256, d_off=2, d_type=DT_DIR, d_reclen=24, d_name=".."} {d_ino=261, d_off=3, d_type=DT_REG, d_reclen=24, d_name="a"} {d_ino=262, d_off=4, d_type=DT_REG, d_reclen=24, d_name="b"} {d_ino=263, d_off=5, d_type=DT_REG, d_reclen=24, d_name="c"} {d_ino=264, d_off=6, d_type=DT_DIR, d_reclen=24, d_name="test"} {d_ino=265, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32,
d_name="linux"}
}, 4096) = 176getdents64(3, {}, 4096)= 0
close(3)Quoted 3 lines
This is with today's git kernel and today's standalone btrfs unstable.
You are using the distro kernel and compile the standalone btrfs module?
yes.
to be honest, i`m slightly newer than 11.1 (did zypper dup to latest factory some days ago)Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
linux:~ # bash -version
GNU bash, version 3.2.39(1)-release (i586-suse-linux-gnu) Copyright (C) 2007 Free Software Foundation, Inc.That is still the same bash, the one you use is a 32bit version. Do you run a 32 bit kernel too? I could try that on a 32 bit box then.
At least on my 32 bit box, tab completion works fine.
It works fine here too on 64 bit. I'll try with openSUSE 11.1 on a 32bit box later tonight.
Quoted 4 lines
But, the
d_offofLLONG_MAXcomes frombtrfs_readdir(). Git had a feature where it would loop infinitely over a directory in some cases and this was my workaround.
Quoted 7 lines
There are other filesystems doing the same, usually with 32bit int max instead of 64 bit int max, I guess that should work fine.
Quoted 2 lines
This should be fixed in git by now, so I can drop it if that really is causing problems in bash.
I'll come back if I can reproduce it with the same environment Roland is using.
I see the same issue on x86 32 bit, with the additional __llseek() between the getdents64(), and the last entry returned by readdir ignored.
If I change the returned LLONG_MAX to LONG_MAX in inode.c, it all works fine, and the __llseek() disappears.
Kay
Quoted 6 lines · Kay Sievers
Quoted 6 lines
There are other filesystems doing the same, usually with 32bit int max instead of 64 bit int max, I guess that should work fine.
Quoted 2 lines
This should be fixed in git by now, so I can drop it if that really is causing problems in bash.
Quoted 8 lines
Quoted 1 line
I'll come back if I can reproduce it with the same environment Roland is using.
I see the same issue on x86 32 bit, with the additional
__llseek()between thegetdents64(), and the last entry returned by readdir ignored.If I change the returned
LLONG_MAXtoLONG_MAXininode.c, it all works fine, and the__llseek()disappears.
Ok, thanks I'll work up a patch.
-chris