Lines Matching full:file
132 /* backing file name */
133 char *file;
134 /* backing file fd */
145 /* name (and fd, below) of the file opened for writing, either the
146 * backing or the cow file. */
147 char *file;
164 .file = NULL, \
172 .file = NULL, \
230 char *file, *backing_file, *serial;
260 if(ubd_dev->file != NULL){
304 file = strsep(&str, ",:");
305 if (*file == '\0')
306 file = NULL;
317 *error_out = "Can't specify both 'd' and a cow file";
322 ubd_dev->file = file;
323 ubd_dev->cow.file = backing_file;
346 " This is used to associate a device with a file in the underlying\n"
348 " COW name and the second is the backing file name. As separator you can\n"
353 " a COW file or a backing file. To override this detection, add the 'd'\n"
356 " Usually, there is a filesystem in the file, but \n"
358 " specified like this. Also, a file which doesn't contain a\n"
365 " UMLs and file locking will be turned off - this is appropriate for a\n"
372 " an empty string, in which case the backing file is not used:\n"
373 " ubd0=File,,Serial\n"
489 char *file;
501 if (ubd_dev->file && ubd_dev->cow.file) {
502 file = ubd_dev->cow.file;
507 fd = os_open_file(ubd_dev->file, of_read(OPENFLAGS()), 0);
516 file = ubd_dev->file;
518 file = backing_file;
521 return os_file_size(file, size_out);
535 static int backing_file_mismatch(char *file, __u64 size, time64_t mtime)
541 err = os_file_modtime(file, &modtime);
544 "file \"%s\", err = %d\n", file, -err);
548 err = os_file_size(file, &actual);
550 printk(KERN_ERR "Failed to get size of backing file \"%s\", "
551 "err = %d\n", file, -err);
559 "vs backing file\n", (unsigned long long) size, actual);
564 "backing file\n", mtime, modtime);
595 printk(KERN_ERR "Backing file mismatch - \"%s\" requested, "
601 static int open_ubd_file(char *file, struct openflags *openflags, int shared,
612 fd = os_open_file(file, *openflags, mode);
620 fd = os_open_file(file, *openflags, mode);
626 printk(KERN_INFO "Not locking \"%s\" on the host\n", file);
631 file, -err);
643 printk(KERN_ERR "Failed to read COW header from COW file "
644 "\"%s\", errno = %d\n", file, -err);
651 file);
656 printk(KERN_ERR "Switching backing file to '%s'\n",
658 err = write_cow_header(file, fd, *backing_file_out,
691 printk(KERN_ERR "Open of COW file '%s' failed, errno = %d\n",
709 if(ubd_dev->cow.file == NULL)
726 create_ptr = (ubd_dev->cow.file != NULL) ? &create_cow : NULL;
727 back_ptr = ubd_dev->no_cow ? NULL : &ubd_dev->cow.file;
729 fd = open_ubd_file(ubd_dev->file, &ubd_dev->openflags, ubd_dev->shared,
735 fd = create_cow_file(ubd_dev->file, ubd_dev->cow.file,
741 printk(KERN_INFO "Creating \"%s\" as COW file for "
742 "\"%s\"\n", ubd_dev->file, ubd_dev->cow.file);
747 printk("Failed to open '%s', errno = %d\n", ubd_dev->file,
753 if(ubd_dev->cow.file != NULL){
769 err = open_ubd_file(ubd_dev->cow.file, &flags, ubd_dev->shared, NULL,
840 if(ubd_dev->file == NULL)
843 if (ubd_dev->cow.file)
852 *error_out = "Couldn't determine size of device's file";
859 'a' + n, ubd_dev->file, -err);
940 ubd_devs[n].file = NULL;
965 if(ubd_dev->file == NULL){
970 CONFIG_CHUNK(str, size, len, ubd_dev->file, 0);
972 if(ubd_dev->cow.file != NULL){
974 CONFIG_CHUNK(str, size, len, ubd_dev->cow.file, 1);
1002 if(ubd_dev->file == NULL)
1048 if(ubd_dev->file == NULL)
1049 ubd_dev->file = "root_fs";
1217 if (dev->cow.file) {
1241 if (dev->cow.file)
1421 /* fds[0] is always either the rw image or our cow file */