search for: file_open

Displaying 20 results from an estimated 82 matches for "file_open".

2018 Aug 19
0
[PATCH v4 4/4] file: Zero for block devices on old kernels
...ig_complete (void) /* The per-connection handle. */ struct handle { int fd; + bool is_block_device; + int sector_size; bool can_punch_hole; bool can_zero_range; bool can_fallocate; + bool can_zeroout; }; /* Create the per-connection handle. */ @@ -129,6 +139,7 @@ static void * file_open (int readonly) { struct handle *h; + struct stat statbuf; int flags; h = malloc (sizeof *h); @@ -150,6 +161,22 @@ file_open (int readonly) return NULL; } + if (fstat (h->fd, &statbuf) == -1) { + nbdkit_error ("fstat: %s: %m", filename); + free (h); +...
2018 Aug 03
0
[PATCH v2 4/4] file: Zero for block devices on old kernels
...ig_complete (void) /* The per-connection handle. */ struct handle { int fd; + bool is_block_device; + int sector_size; bool can_punch_hole; bool can_zero_range; bool can_fallocate; + bool can_zeroout; }; /* Create the per-connection handle. */ @@ -129,6 +139,7 @@ static void * file_open (int readonly) { struct handle *h; + struct stat statbuf; int flags; h = malloc (sizeof *h); @@ -150,6 +161,22 @@ file_open (int readonly) return NULL; } + if (fstat (h->fd, &statbuf) == -1) { + nbdkit_error ("fstat: %s: %m", filename); + free (h); +...
2011 Jul 28
3
efilinux release 0.8
Hi, I'm pleased to announce release 0.8 of efilinux, a reference implementation of a minimal UEFI bootloader. This bootloader has no bells or whistles, it is simply a prototype with the minimum amount of smarts required to load a linux kernel (though loaders for other formats could be added). Currently it only supports booting x86-64 bzImages but i386 support is planned for release 0.9, with
2018 Aug 19
9
[PATCH v3 0/4] file: Zero for block devices and older file systems
This version addresses comments on v3. Changes since v3: - Finally got spacing right (Eric) - Reorder includes (Richard) - Return 0 or -1 instead of r (Richard) - Add common/include/isaligned.h to Makefile.am (Richard) v3 was here: https://www.redhat.com/archives/libguestfs/2018-August/msg00177.html Nir Soffer (4): file: Avoid unsupported fallocate() calls file: Support zero without
2014 Dec 16
2
Samba "%G" replacement not working in "Logon script" ?
...5] ../source3/smbd/files.c:128(file_new) allocated file structure fnum 2158460712 (2 used) [2014/11/21 20:53:36.616995, 3] ../source3/smbd/dosmode.c:163(unix_mode) unix_mode(%g.bat) returning 0744 [2014/11/21 20:53:36.617034, 5] ../source3/smbd/open.c:2168(open_file_ntcreate) open_file_ntcreate: FILE_OPEN requested for file %g.bat and file doesn't exist.
2016 Apr 28
1
poor samba performance with many smaller files
...#39;t know why. I can see in strace logs that openat syscall in vfs_aio_pthread was successful, but it still fails and this messages are logged: [2016/04/28 13:28:59.691782, 5, pid=5623, effective(32697, 10513), real(32697, 0)] ../source3/smbd/open.c:2551(open_file_ntcreate) open_file_ntcreate: FILE_OPEN requested for file subor and file doesn't exist. [2016/04/28 13:28:59.693969, 10, pid=5623, effective(32697, 10513), real(32697, 0)] ../source3/smbd/open.c:4806(create_file_unixpath) create_file_unixpath: NT_STATUS_OBJECT_NAME_NOT_FOUND Any idea what is wrong? And if stat() is the problem,...
2017 Nov 21
1
[nbdkit PATCH] file: Diagnose a missing file earlier
If a user typos the filename for the file plugin, they do not find out about it until later when the first client gets an abrupt hangup, when file_open() fails to open things. Better is to avoid starting a server at all if the file doesn't exist yet. While at it, avoid a memory leak if the caller passes a file= argument more than once. Signed-off-by: Eric Blake <eblake@redhat.com> --- plugins/file/file.c | 5 +++++ 1 file changed, 5...
2018 Aug 02
10
[PATCH 0/3] file: Zero for block devices and older file systems
This is the second version to support efficient zero for block devices on older kernels (e.g. RHEL 7.5), and file systems that do not support yet FALLOC_FS_ZERO_RANGE (e.g. NFS 4.2). Changes since v1: - Split to smaller patches - Skip linux only includes on other systems - Skip code using BLKZEROOUT if the macro is not defined - Try BLKZEROOUT only if the offset and count are aligned to device
2016 Oct 21
3
CTDB and locking issues in 4.4.6 (Classic domain)
> I've now managed to replicate the error on my test setup. I added a > third host and all hell broke loose - no locking at all when opening > Excel files apart from same-host. It seemed fine with two. > > I then downgraded to 4.4.5 and the problem persisted. So it cannot be > a regression from that patch. > > Regards, > > Alex > Here you go: Locked files:
2010 Jul 06
0
*update* SMB Trans2 Response STATUS_OBJECT_NAME_NOT_FOUND Problem
...rks without any problem. It looks like i've an issue on Windows :/ The same problem happen with smb: \> allinfo autoexec.bat as well as many other files. *update* Using FileSpy (from osronline.com) i can see the following, in response to the allinfo command: C:\autoexec.bat STATUS_SUCCESS FILE_OPEN CreOpts: 00200000 Access: 00000080 Share: 00000007 Attrib: 0 Result: FILE_OPENED <-- So it shouldn't be a permissions issue System ... IRP_MJ_QUERY_INFORMATION ..C:\autoexec.bat STATUS_OBJECT_NAME_NOT_FOUND FileAlternateNameInformation FileAlternateNameInformation - From http://msdn.m...
2020 Aug 07
0
[nbdkit PATCH 2/4] file: Add .list_exports support
...} + errno = 0; + } + if (errno) { + nbdkit_error ("readdir: %m"); + close (fd); + return -1; + } + close (fd); + return 0; +} + /* The per-connection handle. */ struct handle { + char *file; int fd; bool is_block_device; int sector_size; @@ -170,21 +229,44 @@ file_open (int readonly) return NULL; } + if (directory) { + const char *exportname = nbdkit_export_name (); + + if (strchr (exportname, '/')) { + nbdkit_error ("exportname cannot contain /"); + errno = EINVAL; + free (h); + return NULL; + } + if (a...
2018 Aug 02
0
[PATCH 3/3] file: Zero for block devices on old kernels
...handle { int fd; + bool is_block_device; + int sector_size; bool can_punch_hole; bool can_zero_range; bool can_fallocate; }; +static bool +is_aligned(struct handle *h, uint64_t n) +{ + return n % h->sector_size == 0; +} + /* Create the per-connection handle. */ static void * file_open (int readonly) { struct handle *h; + struct stat statbuf; int flags; h = malloc (sizeof *h); @@ -150,6 +160,26 @@ file_open (int readonly) return NULL; } + if (fstat (h->fd, &statbuf) == -1) { + nbdkit_error ("fstat: %s: %m", filename); + free (h); +...
2014 Dec 21
2
Samba "%G" replacement not working in "Logon script" ?
...llocated file structure fnum 2158460712 (2 used) >> [2014/11/21 20:53:36.616995, 3] ../source3/smbd/dosmode.c:163(unix_mode) >> unix_mode(%g.bat) returning 0744 >> [2014/11/21 20:53:36.617034, 5] >> ../source3/smbd/open.c:2168(open_file_ntcreate) >> open_file_ntcreate: FILE_OPEN requested for file %g.bat and file >> doesn't exist. >> >> -- >> To unsubscribe from this list go to the following URL and read the >> instructions: https://lists.samba.org/mailman/options/samba [1] Links: ------ [1] https://lists.samba.org/mailman/options/sam...
2018 Aug 18
7
[PATCH v3 0/4] file: Zero for block devices and older file systems
This version addresses some of the comments on v2. Changes since v2: - file_zero: Add missing space in function call - is_aligned: Assert that align is indeed a power of 2 - Spelling in commit message Not changed: - Eric commented that spacing was off: https://www.redhat.com/archives/libguestfs/2018-August/msg00113.html but I could not find anything wrong. - Eric asked if ioctl.h will cause
2018 Aug 03
10
[PATCH v2 0/4] file: Zero for block devices and older file systems
This is the third version to support efficient zero for block devices on older kernels (e.g. RHEL 7.5), and file systems that do not support yet FALLOC_FS_ZERO_RANGE (e.g. NFS 4.2). Changes since v2: - Revert file_can_trim change, since it is too late to change the value after negotiation. Changing the capability dinamically may be useful internally, but it should be done via other means. -
2016 Oct 22
5
CTDB and locking issues in 4.4.6 (Classic domain)
...x 831b9bc..28e98af 100644 > --- a/source3/client/client.c > +++ b/source3/client/client.c > @@ -2498,12 +2498,12 @@ static int cmd_open(void) > > status = cli_ntcreate(targetcli, targetname, 0, > FILE_READ_DATA|FILE_WRITE_DATA, 0, > - FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, > + 0, FILE_OPEN, > 0x0, 0x0, &fnum, NULL); > if (!NT_STATUS_IS_OK(status)) { > status = cli_ntcreate(targetcli, targetname, 0, > FILE_READ_DATA, 0, > - FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, > + 0, FILE_OPEN, > 0x0, 0x0, &fnum, NULL...
2018 Aug 02
0
[PATCH] file: Zero support for block devices and NFS 4.2
...in.h> @@ -116,6 +119,10 @@ file_config_complete (void) /* The per-connection handle. */ struct handle { int fd; + bool is_block_device; + bool can_punch_hole; + bool can_zero_range; + bool can_fallocate; }; /* Create the per-connection handle. */ @@ -123,6 +130,7 @@ static void * file_open (int readonly) { struct handle *h; + struct stat statbuf; int flags; h = malloc (sizeof *h); @@ -144,6 +152,23 @@ file_open (int readonly) return NULL; } + if (fstat (h->fd, &statbuf) == -1) { + nbdkit_error ("fstat: %s: %m", filename); + free (h); +...
2007 Oct 23
1
exporting an FUSE base file system to windows
...22:12, 10] smbd/open.c:open_file_ntcreate(1091) open_file_ntcreate: fname=srb_data, dos_attrs=0x0 access_mask=0x20189 share_access=0x3 create_disposition = 0x1 create_options=0x40 unix mode=0744 oplock_request=3 [2007/10/02 16:22:12, 5] smbd/open.c:open_file_ntcreate(1178) open_file_ntcreate: FILE_OPEN requested for file srb_data and file doesn't exist. [2007/10/02 16:22:12, 10] smbd/trans2.c:set_bad_path_error(2623) set_bad_path_error: err = 2 bad_path = 0 [2007/10/02 16:22:12, 3] smbd/error.c:error_packet(146) error packet at smbd/trans2.c(2629) cmd=162 (SMBntcreateX) NT_STATUS_OBJECT...
2018 Jan 31
1
[nbdkit PATCH] file: Add trim support
...s should not be reached. */ + errno = EOPNOTSUPP; +#endif + return r; +} + static struct nbdkit_plugin plugin = { .name = "file", .longname = "nbdkit file plugin", @@ -279,10 +318,12 @@ static struct nbdkit_plugin plugin = { .open = file_open, .close = file_close, .get_size = file_get_size, + .can_trim = file_can_trim, .pread = file_pread, .pwrite = file_pwrite, - .zero = file_zero, .flush = file_flush, + .trim = file_trim, + .z...
2020 Feb 10
2
[nbdkit PATCH 05/10] plugins: Wire up file-based plugin support for NBD_INFO_INIT_STATE
...ification, are permitted provided that the following conditions are @@ -154,6 +154,9 @@ struct handle { bool can_zero_range; bool can_fallocate; bool can_zeroout; + bool can_extents; + bool init_sparse; + bool init_zero; }; /* Create the per-connection handle. */ @@ -214,6 +217,52 @@ file_open (int readonly) h->can_fallocate = true; h->can_zeroout = h->is_block_device; + h->can_extents = false; + h->init_sparse = false; + h->init_zero = false; +#ifdef SEEK_HOLE + if (!h->is_block_device) { + off_t r; + + /* A simple test to see whether SEEK_DATA/SEEK...