From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kay Sievers" Subject: Re: weird bash autocomplete issue Date: Tue, 16 Dec 2008 22:41:09 +0100 Message-ID: References: <545246795@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: linux-btrfs@vger.kernel.org To: devzero@web.de Return-path: In-Reply-To: <545246795@web.de> List-ID: On Tue, Dec 16, 2008 at 21:46, wrote: >> On Tue, Dec 16, 2008 at 20:37, Roland wrote: >> > 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 >> > ./testdir >> > >> > now, if i do "cd t" in /non-btrfs-mount, "t" autocompletes to "testdir" >> > same for linux - 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. >> > >> > can someone reproduce this ? >> >> Open another shell, find the bash process pid of the first shell with: >> ps afx >> and do: >> strace -p >> Go back to the first shell, hit , 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): > > 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) = 0 > getdents64(3, {{d_ino=258, d_off=9223372036854775807, d_type=DT_DIR, d_reclen=32, d_name="linux"}}, 4096) = 32 On Tue, Dec 16, 2008 at 22:26, wrote: > i assume it has something to do with the large value for d_off of the last dirent ? Looks like, 9223372036854775807 is just LLONG_MAX. Kay