Displaying 20 results from an estimated 61 matches for "f_path".
Did you mean:
ft_path
2013 Jul 25
0
[PATCH V8 21/33] ocfs2: add support for read_iter and write_iter
...* after file limit checks */
loff_t old_size, *ppos = &iocb->ki_pos;
u32 old_clusters;
@@ -2239,11 +2237,11 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
OCFS2_MOUNT_COHERENCY_BUFFERED);
int unaligned_dio = 0;
- trace_ocfs2_file_aio_write(inode, file, file->f_path.dentry,
+ trace_ocfs2_file_write_iter(inode, file, file->f_path.dentry,
(unsigned long long)OCFS2_I(inode)->ip_blkno,
file->f_path.dentry->d_name.len,
file->f_path.dentry->d_name.name,
- (unsigned int)nr_segs);
+ (unsigned long long)pos);
if (iocb->ki_left == 0)...
2013 Jan 09
0
[PATCH V5 19/30] ocfs2: add support for read_iter, write_iter, and direct_IO_bvec
...* after file limit checks */
loff_t old_size, *ppos = &iocb->ki_pos;
u32 old_clusters;
@@ -2238,11 +2236,11 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
OCFS2_MOUNT_COHERENCY_BUFFERED);
int unaligned_dio = 0;
- trace_ocfs2_file_aio_write(inode, file, file->f_path.dentry,
+ trace_ocfs2_file_write_iter(inode, file, file->f_path.dentry,
(unsigned long long)OCFS2_I(inode)->ip_blkno,
file->f_path.dentry->d_name.len,
file->f_path.dentry->d_name.name,
- (unsigned int)nr_segs);
+ (unsigned long long)pos);
if (iocb->ki_left == 0)...
2023 May 20
3
[PATCH v21 22/30] ocfs2: Provide a splice-read stub
...ret;
}
+static ssize_t ocfs2_file_splice_read(struct file *in, loff_t *ppos,
+ struct pipe_inode_info *pipe,
+ size_t len, unsigned int flags)
+{
+ struct inode *inode = file_inode(in);
+ ssize_t ret = 0;
+ int lock_level = 0;
+
+ trace_ocfs2_file_splice_read(inode, in, in->f_path.dentry,
+ (unsigned long long)OCFS2_I(inode)->ip_blkno,
+ in->f_path.dentry->d_name.len,
+ in->f_path.dentry->d_name.name,
+ 0);
+
+ /*
+ * We're fine letting folks race truncates and extending writes with
+ * read across the cluster, just like t...
2013 Jun 30
1
why check f_path.mnt is equal for source and dest in btrfs_ioctl_clone()?
This gives EXDEV for clone operations that btrfs could otherwise execute
and with slight change of circumstances will actually execute fine.
Imagine we have a btrfs on /dev/mapper/foobar with subvols /foo and
/bar. Let’s also imagine top of said fs in mounted at /mnt. In this
case, a cross-subvol clone of /mnt/foo/srcfile to /mnt/bar/dstfile will
succeed.
However, if only the individual
2013 Feb 07
1
[PATCH 3/3] ocfs2: Add freeze protection to ocfs2_file_splice_write()
...ocfs2/file.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 3898499..1f6916c 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2468,6 +2468,9 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,
out->f_path.dentry->d_name.len,
out->f_path.dentry->d_name.name, len);
+ if (!sb_start_file_write(out))
+ return -EAGAIN;
+
if (pipe->inode)
mutex_lock_nested(&pipe->inode->i_mutex, I_MUTEX_PARENT);
@@ -2506,6 +2509,7 @@ static ssize_t ocfs2_file_splice_write(struct pipe_ino...
2023 May 19
0
[PATCH v20 19/32] ocfs2: Provide a splice-read stub
...ret;
}
+static ssize_t ocfs2_file_splice_read(struct file *in, loff_t *ppos,
+ struct pipe_inode_info *pipe,
+ size_t len, unsigned int flags)
+{
+ struct inode *inode = file_inode(in);
+ ssize_t ret = 0;
+ int lock_level = 0;
+
+ trace_ocfs2_file_splice_read(inode, in, in->f_path.dentry,
+ (unsigned long long)OCFS2_I(inode)->ip_blkno,
+ in->f_path.dentry->d_name.len,
+ in->f_path.dentry->d_name.name,
+ 0);
+
+ if (in->f_flags & O_DIRECT)
+ return direct_splice_read(in, ppos, pipe, len, flags);
+
+ /*
+ * We're fine...
2012 Mar 27
13
Create subvolume from a directory?
Hi all,
Just a quick question but can''t find an obvious answer.
Can I create/convert a existing (btrfs) directory into a subvolume?
It would be very helpful when transferring ''partitions'' into btrfs.
I found a similar question way back in google, but that site is
down now generally.
Thanks in advance.
--
To unsubscribe from this list: send the line
2023 Feb 27
2
report BUG: io_uring triggers umount error
...ypes.h>
>>
>> k:fput
>> {
>> $f = (struct file *)arg0;
>> $cnt = $f->f_count;
>>
>> if (!strncmp(comm, "link-cp", 7)) {
>> printf("\n [link-cp] fput() name:%s f_count:%lld <%p> mnt:%p\n",
>> str($f->f_path.dentry->d_name.name), $cnt.counter, kptr($f), kptr($f->f_path.mnt));
>> //printf("%s\n", kstack);
>> }
>> }
>> ```
>>
>
> I am not familiar with io_uring, and can't make sure my analysis is correct.
> Because ocfs2_file_read_iter() retu...
2023 Feb 26
1
report BUG: io_uring triggers umount error
...linux/fs_struct.h>
#include <linux/fs.h>
#include <linux/io_uring_types.h>
k:fput
{
$f = (struct file *)arg0;
$cnt = $f->f_count;
if (!strncmp(comm, "link-cp", 7)) {
printf("\n [link-cp] fput() name:%s f_count:%lld <%p> mnt:%p\n",
str($f->f_path.dentry->d_name.name), $cnt.counter, kptr($f), kptr($f->f_path.mnt));
//printf("%s\n", kstack);
}
}
```
- Heming
2009 Jun 13
1
[PATCH 1/3] Add ioctl to set per file 'compress' flag
...===========
--- newformat2.orig/fs/btrfs/ioctl.c
+++ newformat2/fs/btrfs/ioctl.c
@@ -1240,6 +1240,54 @@ out:
return ret;
}
+/* Ioctl function to set or clear a flag on the file. */
+static long btrfs_ioctl_inode_flag(struct file *file,
+ u32 flag, int set)
+{
+ struct inode *inode = file->f_path.dentry->d_inode;
+ struct btrfs_inode *ip = BTRFS_I(inode);
+ struct btrfs_root *root = ip->root;
+ struct btrfs_trans_handle *trans;
+ int ret;
+
+ if (!is_owner_or_cap(inode))
+ return -EACCES;
+
+ mutex_lock(&inode->i_mutex);
+
+ /* Bail out if already set / cleared. */
+ if (set)...
2023 Feb 26
1
report BUG: io_uring triggers umount error
...;
> #include <linux/io_uring_types.h>
>
> k:fput
> {
> $f = (struct file *)arg0;
> $cnt = $f->f_count;
>
> if (!strncmp(comm, "link-cp", 7)) {
> printf("\n [link-cp] fput() name:%s f_count:%lld <%p> mnt:%p\n",
> str($f->f_path.dentry->d_name.name), $cnt.counter, kptr($f), kptr($f->f_path.mnt));
> //printf("%s\n", kstack);
> }
> }
> ```
>
I am not familiar with io_uring, and can't make sure my analysis is correct.
Because ocfs2_file_read_iter() returns -EOPNOTSUPP, then fails
io_iter...
2011 Mar 31
3
[PATCH 1/3] VFS/ioctl: Add punching-hole support to ioctl().
...emap);
* Only the l_start, l_len and l_whence fields of the 'struct space_resv'
* are used here, rest are ignored.
*/
-int ioctl_preallocate(struct file *filp, void __user *argp)
+int ioctl_preallocate(struct file *filp, void __user *argp, int mode)
{
struct inode *inode = filp->f_path.dentry->d_inode;
struct space_resv sr;
@@ -443,7 +443,7 @@ int ioctl_preallocate(struct file *filp, void __user *argp)
return -EINVAL;
}
- return do_fallocate(filp, FALLOC_FL_KEEP_SIZE, sr.l_start, sr.l_len);
+ return do_fallocate(filp, mode, sr.l_start, sr.l_len);
}
static int file...
2011 Mar 31
3
[PATCH 1/3] VFS/ioctl: Add punching-hole support to ioctl().
...emap);
* Only the l_start, l_len and l_whence fields of the 'struct space_resv'
* are used here, rest are ignored.
*/
-int ioctl_preallocate(struct file *filp, void __user *argp)
+int ioctl_preallocate(struct file *filp, void __user *argp, int mode)
{
struct inode *inode = filp->f_path.dentry->d_inode;
struct space_resv sr;
@@ -443,7 +443,7 @@ int ioctl_preallocate(struct file *filp, void __user *argp)
return -EINVAL;
}
- return do_fallocate(filp, FALLOC_FL_KEEP_SIZE, sr.l_start, sr.l_len);
+ return do_fallocate(filp, mode, sr.l_start, sr.l_len);
}
static int file...
2023 Mar 01
1
report BUG: io_uring triggers umount error
...k:fput
>>> {
>>> $f = (struct file *)arg0;
>>> $cnt = $f->f_count;
>>>
>>> if (!strncmp(comm, "link-cp", 7)) {
>>> printf("\n [link-cp] fput() name:%s f_count:%lld <%p> mnt:%p\n",
>>> str($f->f_path.dentry->d_name.name), $cnt.counter, kptr($f), kptr($f->f_path.mnt));
>>> //printf("%s\n", kstack);
>>> }
>>> }
>>> ```
>>>
>>
>> I am not familiar with io_uring, and can't make sure my analysis is correct.
>> Beca...
2009 Nov 03
2
[PATCH]] Btrfs: fix destroy snapshot to get the right parent dentry
...octl.c b/fs/btrfs/ioctl.c
index cdbb054..fe6ac9a 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -741,7 +741,7 @@ out:
static noinline int btrfs_ioctl_snap_destroy(struct file *file,
void __user *arg)
{
- struct dentry *parent = fdentry(file);
+ struct dentry *parent = file->f_path.dentry->d_parent;
struct dentry *dentry;
struct inode *dir = parent->d_inode;
struct inode *inode;
@@ -793,9 +793,6 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
dest = BTRFS_I(inode)->root;
mutex_lock(&inode->i_mutex);
- err = d_invalidate(dentry);...
2012 Nov 12
0
[PATCH 3/3] ocfs2: Add freeze protection to ocfs2_file_splice_write()
...ocfs2/file.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 93ef34d..9907243 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2486,6 +2486,9 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,
out->f_path.dentry->d_name.len,
out->f_path.dentry->d_name.name, len);
+ if (!sb_start_file_write(out))
+ return -EAGAIN;
+
if (pipe->inode)
mutex_lock_nested(&pipe->inode->i_mutex, I_MUTEX_PARENT);
@@ -2527,6 +2530,7 @@ static ssize_t ocfs2_file_splice_write(struct pipe_ino...
2009 Jun 19
2
[PATCH] ocfs2: Update atime in splice read if necessary.
...s/ocfs2/file.c
index 775ac34..95cba48 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2025,7 +2025,7 @@ static ssize_t ocfs2_file_splice_read(struct file *in,
size_t len,
unsigned int flags)
{
- int ret = 0;
+ int ret = 0, lock_level = 0;
struct inode *inode = in->f_path.dentry->d_inode;
mlog_entry("(0x%p, 0x%p, %u, '%.*s')\n", in, pipe,
@@ -2036,12 +2036,12 @@ static ssize_t ocfs2_file_splice_read(struct file *in,
/*
* See the comment in ocfs2_file_aio_read()
*/
- ret = ocfs2_inode_lock(inode, NULL, 0);
+ ret = ocfs2_inode_lock_ati...
2010 Nov 19
5
[PATCH 1/1] Ocfs2: Teach 'coherency=full' O_DIRECT writes to correctly up_read i_alloc_sem.
...ed, 29 insertions(+), 2 deletions(-)
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index f1e962c..fd0713c 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -568,7 +568,7 @@ static void ocfs2_dio_end_io(struct kiocb *iocb,
bool is_async)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
- int level;
+ int level, coherency;
/* this io's submitter should not have unlocked this before we could */
BUG_ON(!ocfs2_iocb_is_rw_locked(iocb));
@@ -576,7 +576,12 @@ static void ocfs2_dio_end_io(struct kiocb *iocb,
ocfs2_iocb_clear_rw_locked(iocb);
level = oc...
2023 Feb 24
1
report BUG: io_uring triggers umount error
On 2/24/23 4:03 PM, Heming Zhao wrote:
> On 2/24/23 3:52 PM, Joseph Qi wrote:
>>
>>
>> On 2/24/23 3:48 PM, Heming Zhao via Ocfs2-devel wrote:
>>> On 2/24/23 2:54 PM, Joseph Qi wrote:
>>>> I can reproduce this in my local VM.
>>>> I've traced ocfs2_dismount_volume and found that it hasn't been called.
>>>> So EBUSY is
2011 Aug 17
2
[PATCH] btrfs: fix d_off in the first dirent
...IR);
+ 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_path.dentry);
over = filldir(dirent, "..", 2,
- 2, pino, DT_DIR);
+ filp->f_pos, pino, DT_DIR);
if (over)
return 0;
filp->f_pos = 2;
--
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to...