search for: dt_dir

Displaying 19 results from an estimated 19 matches for "dt_dir".

Did you mean: dtb_dir
2011 Aug 17
2
[PATCH] btrfs: fix d_off in the first dirent
...e.c index 15fceef..9c1297b 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4125,7 +4125,8 @@ static int btrfs_real_readdir(struct file *filp, void *dirent, /* special case for "." */ if (filp->f_pos == 0) { - over = filldir(dirent, ".", 1, 1, btrfs_ino(inode), DT_DIR); + over = filldir(dirent, ".", 1, + filp->f_pos, inode->i_ino, DT_DIR); if (over) return 0; filp->f_pos = 1; @@ -4134,7 +4135,7 @@ static int btrfs_real_readdir(struct file *filp, void *dirent, if (filp->f_pos == 1) { u64 pino = parent_ino(filp->f_...
2010 Jun 24
0
[PATCH] COM32: Fix read() with directories
...lt;minmax.h> #include <klibc/compiler.h> +#include <dirent.h> #include "file.h" ssize_t read(int fd, void *buf, size_t count) @@ -46,6 +47,10 @@ ssize_t read(int fd, void *buf, size_t count) errno = EBADF; return -1; } + if (fp->i.fd.d_type == DT_DIR) { + errno = EISDIR; + return -1; + } return fp->iop->read(fp, buf, count); }
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...*/ +char rosh_d_type2char_human(unsigned char d_type) +{ + char ret; + switch (d_type) { + case DT_UNKNOWN: + ret = 'U'; + break; /* Unknown */ + case DT_FIFO: + ret = 'F'; + break; /* FIFO */ + case DT_CHR: + ret = 'C'; + break; /* Char Dev */ + case DT_DIR: + ret = 'D'; + break; /* Directory */ + case DT_BLK: + ret = 'B'; + break; /* Block Dev */ + case DT_REG: + ret = 'R'; + break; /* Regular File */ + case DT_LNK: + ret = 'L'; + break; /* Link, Symbolic */ + case DT_SOCK: + ret = 'S'; + br...
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...e the only " + "supported ATM"); + goto out; + } + + if (!inode) { + xfs_debug("Entry not found!"); + goto out; + } + + if (inode->mode == DT_REG) { + XFS_PVT(inode)->i_offset = 0; + XFS_PVT(inode)->i_cur_extent = 0; + } else if (inode->mode == DT_DIR) { + XFS_PVT(inode)->i_btree_offset = 0; + XFS_PVT(inode)->i_leaf_ent_offset = 0; + } + + return inode; + +out: + return NULL; +} + +static int xfs_readlink(struct inode *inode, char *buf) +{ + struct fs_info *fs = inode->fs; + xfs_dinode_t *core; + int pathlen = -1; +...
2008 Jul 20
26
[PATCH] NFS support for btrfs - v2
Hi, Here''s an implementation of NFS support for btrfs. It does not work in one particular case as described in http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg00298.html. This uses the btrfs_iget helper introduced previously. Comments ? --- Signed-off-by: Balaji Rao <balajirrao@gmail.com> diff -r 3f0eee804974 Makefile --- a/Makefile Thu Jun 26 10:34:20 2008 -0400
2019 Oct 14
0
Re: [PATCH libnbd] nbdfuse: New tool to present a network block device in a FUSE filesystem.
...ile_info *fi) > +{ > + if (strcmp (path, "/") != 0) > + return -ENOENT; > + > + filler (buf, ".", NULL, 0); > + filler (buf, "..", NULL, 0); > + filler (buf, filename, NULL, 0); > + Does FUSE have a way to populate d_type during readdir (DT_DIR for '.', '..', DT_REG for filename)? > +static int > +nbdfuse_write (const char *path, const char *buf, > + size_t count, off_t offset, > + struct fuse_file_info *fi) > +{ > + /* Probably shouldn't happen because of nbdfuse_open...
2016 Feb 17
8
[PATCH supermin 0/2] Allow an alternate libc to be used for init.
v1 -> v2: - If we split out the init program into a separate init/ directory, that makes it much easier to build against an alternate libc. I tried to build against uClibc, but uClibc requires an entire build chain, which looked like it was going to be a massive ballache. Rich.
2014 May 29
0
[PATCH 2/2] core/fs: Add support for Unix File system 1/2.
...fs)->ufs_iget_by_inr(fs, dir->inode_value); +} + +static int ufs_readlink(struct inode *inode, char *buf) +{ + ufs_debug("ufs_readlink\n"); + return inode->size; +} + +static inline enum dir_type_flags get_inode_mode(uint8_t attr) +{ + return (attr & UFS_DTYPE_DIR) ? DT_DIR : DT_REG; +} + +/* + * Read one directory entry at a time + */ +static int ufs_readdir(struct file *file, struct dirent *dirent) +{ + struct fs_info *fs = file->fs; + struct inode *inode = file->inode; + const struct ufs_dir_entry *dir; + const char *data; + block_t index = fil...
2019 Oct 12
3
[PATCH libnbd] nbdfuse: New tool to present a network block device in a FUSE filesystem.
This program allows you to turn a network block device source into a FUSE filesystem containing a virtual file: $ nbdkit memory 128M $ mkdir mp $ nbdfuse mp/ramdisk nbd://localhost & $ ls -l mp total 0 -rw-rw-rw-. 1 rjones rjones 134217728 Oct 12 15:09 ramdisk $ dd if=/dev/urandom bs=1M count=128 of=mp/ramdisk conv=notrunc,nocreat 128+0 records in 128+0 records out
2013 Jul 12
1
[PATCH 001/001] core/fs: Add support to Unix File system 1/2.
...fs)->ufs_iget_by_inr(fs, dir->inode_value); +} + +static int ufs_readlink(struct inode *inode, char *buf) +{ + ufs_debug("ufs_readlink\n"); + return inode->size; +} + +static inline enum dir_type_flags get_inode_mode(uint8_t attr) +{ + return (attr & UFS_DTYPE_DIR) ? DT_DIR : DT_REG; +} + +/* + * Read one directory entry at a time + */ +static int ufs_readdir(struct file *file, struct dirent *dirent) +{ + struct fs_info *fs = file->fs; + struct inode *inode = file->inode; + const struct ufs_dir_entry *dir; + const char *data; + block_t index = fil...
2014 May 29
3
[PATCH 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com> Wrote the documentation below. I think it would be good to push the doc to the wiki as soon as the UFS support gets merged. Unix Fast File System (UFS/FFS) 1/2 on Syslinux - (usage/install) ----- There is a confusion about the name of this file system, then I decided to contact the author who replied: "The name has always been
2011 Jan 06
3
Offline Deduplication for Btrfs V2
Just a quick update, I''ve dropped the hashing stuff in favor of doing a memcmp in the kernel to make sure the data is still the same. The thing that takes a while is reading the data up from disk, so doing a memcmp of the entire buffer isn''t that big of a deal, not to mention there''s a possiblity for malicious users if there is a problem with the hashing algorithms we
2014 May 29
3
[PATCH v2 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com> Change since v1: * Fix bug on dentry structure (thank you specification; btw, sarcasm), and consequently a bug on ufs_readdir. * Add readlink support (applied tests for symlinks whose destionation path were stored in blk pointers and the file itself). * Several improvements. Wrote the documentation below. I think it would be good to
2012 Aug 20
13
[PATCH 00/12] Multidisk support
Hello, the following patches should get multidisk access working. The syntax accepted is the following: (hdx,y)/path/to/file where x is the disk number and start at 0 and the y is the partition number starting at 1. So (hd0,1) is the first partition of the first disk. the other accepted syntax is using MBR's 32 bits disk signature so for example: (mbr:0x12345678,2)/foo/bar would address
2011 Apr 16
20
[PATCH 00/20] Switch to ELF modules
From: Matt Fleming <matt.fleming at linux.intel.com> This series fixes some bugs and switches the elflink branch to be entirely ELF modules. It applies on top of, http://syslinux.zytor.com/archives/2011-April/016369.html The deletions in the diff stat below are mainly from deleting com32/elflink/modules (finally!). Now there should be no duplicate code because we don't need COM32 and
2009 Jan 30
8
[PATCH 0/7] ocfs2: Directory indexing support
The following patches implement indexed directory support in Ocfs2, mostly according to the design doc I wrote up a while ago: http://oss.oracle.com/osswiki/OCFS2/DesignDocs/IndexedDirectories The patches have been rebased on top of 2.6.29-rc2. It should be trivial to put them into merge_window. Things are what I'd call complete now. I'd like to get these into the merge_window branch
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...ne, fp); - fclose (fp); - - fprintf (stderr, "supermin: cmdline: %s", cmdline); -} - -/* Display a directory on stderr. This is used for debugging only. */ -static char -dirtype (int dt) -{ - switch (dt) { - case DT_BLK: return 'b'; - case DT_CHR: return 'c'; - case DT_DIR: return 'd'; - case DT_FIFO: return 'p'; - case DT_LNK: return 'l'; - case DT_REG: return '-'; - case DT_SOCK: return 's'; - case DT_UNKNOWN: return 'u'; - default: return '?'; - } -} - -static void -show_directory (const char *dirname)...
2011 Jan 05
52
Offline Deduplication for Btrfs
Here are patches to do offline deduplication for Btrfs. It works well for the cases it''s expected to, I''m looking for feedback on the ioctl interface and such, I''m well aware there are missing features for the userspace app (like being able to set a different blocksize). If this interface is acceptable I will flesh out the userspace app a little more, but I believe the
2009 Mar 17
33
[git patches] Ocfs2 updates for 2.6.30
Hi, The following patches comprise the bulk of Ocfs2 updates for the 2.6.30 merge window. Aside from larger, more involved fixes, we're adding the following features, which I will describe in the order their patches are mailed. Sunil's exported some more state to our debugfs files, and consolidated some other aspects of our debugfs infrastructure. This will further aid us in debugging