search for: rewinddir

Displaying 20 results from an estimated 28 matches for "rewinddir".

2023 Feb 16
1
Missing Files/Missing Folders from an NFS Share
Alternately, we could possibly modify the dptr_TellDir function to set a flag somewhere if it ever returns a negative offset. Then any calls to dptr_SeekDir checks if the flag is set and does a slower approach of a RewindDir and then multiple ReadDir & TellDir calls until we get the matching offset. If flag is not set then go with the normal SeekDir call??? On Fri, 17 Feb 2023 at 00:40, Conor Armstrong <conorarmstrong at gmail.com> wrote: > Ok, starting to make sense now. In order to fix it.... > &g...
2023 Feb 16
1
Missing Files/Missing Folders from an NFS Share
...376809161586095012 File: 3507, Offset: -376809161585570724 ... The negative NFS negative offsets seem to be managed already in source3/smbd/dir.c in the map_dir_offset_to_wire() function which adjusts for signed/unsigned longs. You mention that NFS doesn't have a working seekdir()/telldir()/rewinddir(). Other than the different offset (cookie) management, do you know of any other differences? I had a look at the wireshark dumps. I'm getting a STATUS_PENDING shortly followed by a STATUS_CANCELLED for the NFS share which are absent on the block storage share. > On Wed, Feb 15, 2023 at 0...
2008 Nov 27
1
RFC: COMBOOT API directory calls
...order to track progress within the directory, I'll need to keep track of the current sector number that is being read and the offset within the sector for the next file entry to read. I'm contemplating if I should also keep track of the starting sector of the directory (in case we need to rewinddir()). At the moment, I'm first looking at SYSLINUX (the other disk derivatives are next). It has a struc open_file_t and an array containing these strucs Files. Should I create a new struc, open_dir_t to house the needed data elements, or reuse the existing struc? If I should reuse open_file_...
2023 Feb 15
1
[jra@samba.org: Re: Missing Files/Missing Folders from an NFS Share]
...sue has arisen a few times over the past couple of years and > never any real resolution.? Would be good to get it solved once and for > all. Samba is merely making opendir()/readdir()/closedir() calls in a loop in this codepath. It's possible we may also be using seekdir() telldir()/rewinddir() calls, which may not be returning a consistent view of the directory over NFS. Get debug level 10 logs plus a wireshark trace to see what is going on both in the fileserver and on the wire. ----- End forwarded message -----
2023 Feb 15
1
Missing Files/Missing Folders from an NFS Share
On Wed, Feb 15, 2023 at 08:06:28PM +0100, Conor Armstrong wrote: > Rowland & Jeremy - thanks for this! > I built a copy of the latest version from github 4.19 and same issue > arises. ? > I will have a look at the wireshark trace and see if I can spot anything > obvious there. > I'm not an expert on this, but as far?as I know NFS isn't fully POSIX >
2019 Sep 23
0
[PATCH v2 5/5] build: remove unused gnulib modules
...ests fts getaddrinfo getaddrinfo-tests getcwd getcwd-tests gnu-make hostent i-ring i-ring-tests iconv iconv-tests inet_ntop inet_ntop-tests isatty isatty-tests openat-safer openat-safer-tests opendirat ptsname_r ptsname_r-tests read-file read-file-tests rewinddir servent ttyname_r ttyname_r-tests xgetcwd Some of the removed modules are still used pulled indirectly as dependency of other modules. There should be no behaviour change on recent Linux distros, although older distros were not tested (adding a module back is easy, anyway). Remove accord...
2020 Aug 07
1
Re: [nbdkit PATCH 2/4] file: Add .list_exports support
...ght be longer but a bit clearer? > + if (directory && (dir = opendir (directory)) == NULL) { > + nbdkit_error ("opendir: %m"); > return -1; > } What happens if the contents of the directory change while the file plugin is running? I guess we're using rewinddir so that's fine. But maybe we want to defer opening this until we actually do list_exports? I can see arguments both ways TBH, one obvious one being that it'd be nice to fail early if directory doesn't exist at all. However if we defer opening the directory til it is needed then we wo...
2023 Feb 16
1
Missing Files/Missing Folders from an NFS Share
...1585570724 > > ... > > The negative NFS negative offsets seem to be managed already > in?source3/smbd/dir.c in the?map_dir_offset_to_wire() function which > adjusts for signed/unsigned longs. > You mention that?NFS doesn't have a working > seekdir()/telldir()/rewinddir(). Other than the different offset (cookie) > management, do you know of any other differences? > I had a look at the wireshark dumps. I'm getting a STATUS_PENDING shortly > followed by a STATUS_CANCELLED for the NFS share which are absent on the > block storage share. Samb...
2019 Sep 23
6
[PATCH v2 0/5] remove unused gnulib modules
This is an extended version of: https://www.redhat.com/archives/libguestfs/2019-September/msg00178.html It adds a couple of simple code changes, so it makes it possible to drop more modules. In addition, more unused modules were dropped. Pino Toscano (5): tests: switch away from xgetcwd daemon: move read_whole_file to common utils daemon: switch from read_file to read_whole_file daemon:
2019 Nov 27
7
[PATCH v3 0/6] remove unused build stuff
This is an extended version of: https://www.redhat.com/archives/libguestfs/2019-September/msg00288.html Apparently I forgot it on my tree, so I'm posting that series again, adding an extra cleanup more due to the v2v/common splits. Pino Toscano (6): tests: switch away from xgetcwd daemon: move read_whole_file to common utils daemon: switch from read_file to read_whole_file daemon:
2020 Aug 15
2
Re: [PATCH nbdkit] New ondemand plugin.
...* the "default" file was created? I don't think we need to. > >+ */ > >+ if (nbdkit_add_export (exports, "", NULL) == -1) > >+ return -1; > >+ if (default_only) return 0; > >+ > >+ /* Read the rest of the exports. */ > >+ rewinddir (exportsdir); > >+ > >+ /* XXX Output is not sorted. Does it matter? */ > >+ while (errno = 0, (d = readdir (exportsdir)) != NULL) { > >+ /* Skip all dot files. "." anywhere in the export name is > >+ * rejected by the plugin, so commands can use d...
2020 Aug 15
0
Re: [PATCH nbdkit] New ondemand plugin.
...X Should we check if > + * the "default" file was created? I don't think we need to. > + */ > + if (nbdkit_add_export (exports, "", NULL) == -1) > + return -1; > + if (default_only) return 0; > + > + /* Read the rest of the exports. */ > + rewinddir (exportsdir); > + > + /* XXX Output is not sorted. Does it matter? */ > + while (errno = 0, (d = readdir (exportsdir)) != NULL) { > + /* Skip all dot files. "." anywhere in the export name is > + * rejected by the plugin, so commands can use dot files to "hi...
2023 Feb 16
2
Missing Files/Missing Folders from an NFS Share
Ok, starting to make sense now. In order to fix it.... I note that the lower level calls are wrapped in dir.c - eg dptr_SeekDir(...) wraps SeekDir(...) this might allow for some code to use array indexes instead of NFS cookies as noted by Chris Chilvers here for the 3.10 kernel: https://lore.kernel.org/all/CAAmbk-e-YQAPo6QyNB0aJyc9qzUShmEC+x5eTR7wqp1ABWADsg at mail.gmail.com/T/ > On the
2003 May 31
11
[Bug 581] SFTP "ls" listings never end
http://bugzilla.mindrot.org/show_bug.cgi?id=581 Summary: SFTP "ls" listings never end Product: Portable OpenSSH Version: -current Platform: Alpha OS/Version: OSF/1 Status: NEW Severity: major Priority: P2 Component: sftp-server AssignedTo: openssh-bugs at mindrot.org ReportedBy:
2020 Aug 14
2
[PATCH nbdkit] New ondemand plugin.
...entry should be the default export. XXX Should we check if + * the "default" file was created? I don't think we need to. + */ + if (nbdkit_add_export (exports, "", NULL) == -1) + return -1; + if (default_only) return 0; + + /* Read the rest of the exports. */ + rewinddir (exportsdir); + + /* XXX Output is not sorted. Does it matter? */ + while (errno = 0, (d = readdir (exportsdir)) != NULL) { + /* Skip all dot files. "." anywhere in the export name is + * rejected by the plugin, so commands can use dot files to "hide" + * files in...
2008 Jan 30
4
btrfs and git-reflog
I was just playing with git 1.5.3.8 and btrfs 0.11, and I noticed something odd. If I prepare a very simple repository: $ mkdir foo $ cd foo $ git init Initialized empty Git repository in .git/ $ echo hi > blort $ git add . $ git commit -m create Created initial commit 4ae9415: create 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 blort and then
2020 Aug 07
0
[nbdkit PATCH 2/4] file: Add .list_exports support
...ist_exports (int readonly, int default_only, + struct nbdkit_exports *exports) +{ + struct dirent *entry; + struct stat sb; + int fd; + + if (!directory) + return nbdkit_add_export (exports, "", NULL); + + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock); + rewinddir (dir); + fd = dirfd (dir); + if (fd == -1) { + nbdkit_error ("dirfd: %m"); + return -1; + } + errno = 0; + while ((entry = readdir (dir)) != NULL) { + /* TODO: Optimize with d_type and/or statx when present? */ + if (fstatat (fd, entry->d_name, &sb, 0) == 0 &&a...
2005 Jun 14
4
Missing files on Windows client side.
In a directory with approximately 6000 files, several files are missing on the Windows side. If I check the directory on Unix (AIX) they are all there. As far as I can see there's nothing strange with this files en I can't see any connection between the missing files. It looks like it's randomly. A few examples of missing files: FAKTREF.10062005.16 (See debug information)
2020 Aug 07
8
[nbdkit PATCH 0/4] More .list_exports uses
Here's changes to the file plugin (which I'm happy with) and a new exportname filter (which is still at RFC stage; I need to finish implementing strict mode in .open, and add tests). I also discovered that we really want .list_exports and .open to know when they are used on plaintext vs. tls clients for --tls=on, and we may want to split out a new .default_export callback rather than
2020 Aug 27
0
[PATCH nbdkit 2/2] api: Remove .list_exports from nbdkit 1.22 release.
...entry should be the default export. XXX Should we check if - * the "default" file was created? I don't think we need to. - */ - if (nbdkit_add_export (exports, "", NULL) == -1) - return -1; - if (default_only) return 0; - - /* Read the rest of the exports. */ - rewinddir (exportsdir); - - /* XXX Output is not sorted. Does it matter? */ - while (errno = 0, (d = readdir (exportsdir)) != NULL) { - /* Skip any file containing non-permitted characters '.' and ':'. - * As a side effect this skips all dot-files. Commands can use - * dot-file...