Displaying 20 results from an estimated 30 matches for "i_size_write".
2024 Oct 29
1
[PATCH 2/2] [v8] drm/nouveau: expose GSP-RM logging buffers via debugfs
...subdev,
> > + "failed to create %s debugfs entry\n", name);
> > + return NULL;
> > + }
> > +
> > + /*
> > + * For some reason, debugfs_create_blob doesn't set the size of the
> > + * dentry, so do that here.
> > + */
> > + i_size_write(d_inode(dir), blob->size);
>
> I think debugfs entries typically don't need this. Do we need it?
Yes. I submitted a patch to debugfs earlier this year that would fix it for
all debugfs blobs, but it was rejected because I was asked to fix all of
debugfs itself, which I wasn't wi...
2010 Nov 22
0
[PATCH] Btrfs: fix typo in fallocate to make it honor actual size
...t = start;
+ u64 i_size;
int ret = 0;
bool own_trans = true;
@@ -6882,11 +6883,11 @@ static int __btrfs_prealloc_file_range(struct inode *inode, int mode,
(actual_len > inode->i_size) &&
(cur_offset > inode->i_size)) {
if (cur_offset > actual_len)
- i_size_write(inode, actual_len);
+ i_size = actual_len;
else
- i_size_write(inode, cur_offset);
- i_size_write(inode, cur_offset);
- btrfs_ordered_update_i_size(inode, cur_offset, NULL);
+ i_size = cur_offset;
+ i_size_write(inode, i_size);
+ btrfs_ordered_update_i_size(inode, i_size, NULL)...
2010 Jan 22
2
[PATCH -v2] btrfs: Use correct values when updating inode i_size on fallocate
...gt;max_extent);
@@ -5835,9 +5836,15 @@ static int prealloc_file_range(struct inode *inode, u64 start, u64 end,
inode->i_ctime = CURRENT_TIME;
BTRFS_I(inode)->flags |= BTRFS_INODE_PREALLOC;
if (!(mode & FALLOC_FL_KEEP_SIZE) &&
- cur_offset > inode->i_size) {
- i_size_write(inode, cur_offset);
- btrfs_ordered_update_i_size(inode, cur_offset, NULL);
+ (actual_len > inode->i_size) &&
+ (cur_offset > inode->i_size)) {
+
+ if (cur_offset > actual_len)
+ i_size = actual_len;
+ else
+ i_size = cur_offset;
+ i_size_write(inode, i_siz...
2010 Apr 26
0
[PATCH V2 11/12] Btrfs: Pre-allocate space for data relocation
...e & FALLOC_FL_KEEP_SIZE) &&
- (actual_len > inode->i_size) &&
- (cur_offset > inode->i_size)) {
-
+ (actual_len > inode->i_size) &&
+ (cur_offset > inode->i_size)) {
if (cur_offset > actual_len)
- i_size = actual_len;
+ i_size_write(inode, actual_len);
else
- i_size = cur_offset;
- i_size_write(inode, i_size);
- btrfs_ordered_update_i_size(inode, i_size, NULL);
+ i_size_write(inode, cur_offset);
+ i_size_write(inode, cur_offset);
+ btrfs_ordered_update_i_size(inode, cur_offset, NULL);
}
ret = btrfs_up...
2024 Oct 03
1
[PATCH 2/2] [v8] drm/nouveau: expose GSP-RM logging buffers via debugfs
..._ERR(dir)) {
> + nvkm_error(&gsp->subdev,
> + "failed to create %s debugfs entry\n", name);
> + return NULL;
> + }
> +
> + /*
> + * For some reason, debugfs_create_blob doesn't set the size of the
> + * dentry, so do that here.
> + */
> + i_size_write(d_inode(dir), blob->size);
I think debugfs entries typically don't need this. Do we need it?
> +
> + return dir;
> +}
> +
> +/**
> + * r535_gsp_libos_debugfs_init - create logging debugfs entries
> + * @gsp: gsp pointer
> + *
> + * Create the debugfs entries. Thi...
2024 Oct 30
2
[PATCH 2/2] [v9] drm/nouveau: expose GSP-RM logging buffers via debugfs
...rebased to drm-misc-next
- move nvkm_gsp logging dentries into debugfs struct
- add gsp_logging_debugfs_root and always create the root dentry
- remove root struct in r535.c, along with mutex code
- rename dir to dent
- add missing calls to create_debugfs helper
- r535_gsp_copy_log was not calling i_size_write
drivers/gpu/drm/nouveau/include/nvif/log.h | 53 +++
.../gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 20 +
drivers/gpu/drm/nouveau/nouveau_drm.c | 45 ++
.../gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 444 +++++++++++++++++-
4 files changed, 561 insertions(+), 1 deletion(-)
create...
2024 Jul 29
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...(!gsp->blob_pmu.data)
+ goto error;
+
+ dir_pmu = debugfs_create_blob("logpmu", 0444, dir, &gsp->blob_pmu);
+ if (IS_ERR(dir_pmu)) {
+ nvkm_error(&gsp->subdev, "failed to create logpmu debugfs entry\n");
+ kfree(gsp->blob_pmu.data);
+ goto error;
+ }
+
+ i_size_write(d_inode(dir_init), gsp->blob_init.size);
+ i_size_write(d_inode(dir_intr), gsp->blob_intr.size);
+ i_size_write(d_inode(dir_rm), gsp->blob_rm.size);
+ i_size_write(d_inode(dir_pmu), gsp->blob_pmu.size);
+
+ r535_gsp_msg_ntfy_add(gsp, NV_VGPU_MSG_EVENT_UCODE_LIBOS_PRINT,
+ r535_g...
2024 Oct 30
2
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp. This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
---
.../gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 1 +
2024 Jun 12
2
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp. This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
---
v2: rebased to drm-misc-next
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...(!path)
@@ -3190,6 +3192,13 @@ search_again:
ret = btrfs_release_and_test_data_extent(trans, root,
path, inode, found_key.offset,
new_size);
+ if (root->ref_cows ||
+ root == root->fs_info->tree_root) {
+ if (ret && found_key.offset < old_size)
+ i_size_write(inode, found_key.offset);
+ else if (!ret)
+ i_size_write(inode, new_size);
+ }
if (!ret)
break;
}
@@ -3247,12 +3256,10 @@ out:
static int btrfs_truncate_page(struct address_space *mapping, loff_t from)
{
struct inode *inode = mapping->host;
- struct btrfs_root *root = B...
2013 Jun 20
2
[PATCH] ocfs2: llseek requires to ocfs2 inode lock for the file in SEEK_END
llseek requires ocfs2 inode lock for updating the file size in SEEK_END.
because the file size maybe update on another node.
if it not . after call llseek in SEEK_END. the position is old.
this bug can be reproduce the following scenario:
at first ,we dd a test fileA,the file size is 10k.
on NodeA:
---------
1) open the test fileA, lseek the end of file. and print the position.
2) close the test
2024 Aug 02
1
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp. This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
---
Notes:
v2:
added get/put_device calls
2024 Jul 29
2
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp. This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
v2:
added get/put_device calls
---
2024 Jun 18
1
[PATCH 2/2] [v5] drm/nouveau: expose GSP-RM logging buffers via debugfs
...nstance ID is just a 0-based index for the engine. The class ID is just some seemingly random number that distinguishes the various engines. Building RM involves a lot of pre-processing with config files to generate much of the code that is compiled, and these class IDs are one example.
+ i_size_write(d_inode(dir_init), gsp->blob_init.size);
+ i_size_write(d_inode(dir_intr), gsp->blob_intr.size);
+ i_size_write(d_inode(dir_rm), gsp->blob_rm.size);
+ i_size_write(d_inode(dir_pmu), gsp->blob_pmu.size);
+
+ r535_gsp_msg_ntfy_add(gsp, 0x0000100C, r535_gsp_msg...
2024 Sep 10
1
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp. This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
---
.../gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 1 +
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...+
> + dir_pmu = debugfs_create_blob("logpmu", 0444, dir, &gsp->blob_pmu);
> + if (IS_ERR(dir_pmu)) {
> + nvkm_error(&gsp->subdev, "failed to create logpmu debugfs entry\n");
> + kfree(gsp->blob_pmu.data);
> + goto error;
> + }
> +
> + i_size_write(d_inode(dir_init), gsp->blob_init.size);
> + i_size_write(d_inode(dir_intr), gsp->blob_intr.size);
> + i_size_write(d_inode(dir_rm), gsp->blob_rm.size);
> + i_size_write(d_inode(dir_pmu), gsp->blob_pmu.size);
> +
> + r535_gsp_msg_ntfy_add(gsp, NV_VGPU_MSG_EVENT_UCODE_LIBO...
2023 Jan 18
9
remove most callers of write_one_page v3
Hi all,
this series removes most users of the write_one_page API. These helpers
internally call ->writepage which we are gradually removing from the
kernel.
Changes since v2:
- more minix error handling fixes
Changes since v1:
- drop the btrfs changes (queue up in the btrfs tree)
- drop the finaly move to jfs (can't be done without the btrfs patches)
- fix the existing minix code to
2009 Apr 07
0
[PATCH 1/1] OCFS2: use i_size_read() instead of direct accessing inode->i_size
.../fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index b2c52b3..4491851 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1920,7 +1920,7 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
out_write_size:
pos += copied;
- if (pos > inode->i_size) {
+ if (pos > i_size_read(inode)) {
i_size_write(inode, pos);
mark_inode_dirty(inode);
}
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index a5887df..eabfe65 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1854,8 +1854,8 @@ relock:
* blocks outside i_size. Trim these off again.
* Don't need i_size_read because we hold i...
2009 Nov 02
0
[PATCH 7/8] Make fallocate(2) more ENOSPC friendly
...tid + ins.offset;
- btrfs_unreserve_metadata_space(root, 1);
- }
-out:
- if (cur_offset > start) {
+
inode->i_ctime = CURRENT_TIME;
BTRFS_I(inode)->flags |= BTRFS_INODE_PREALLOC;
if (!(mode & FALLOC_FL_KEEP_SIZE) &&
- cur_offset > i_size_read(inode))
- btrfs_i_size_write(inode, cur_offset);
+ cur_offset > inode->i_size) {
+ i_size_write(inode, cur_offset);
+ btrfs_ordered_update_i_size(inode, cur_offset, NULL);
+ }
+
ret = btrfs_update_inode(trans, root, inode);
BUG_ON(ret);
+
+ btrfs_end_transaction(trans, root);
+ btrfs_unreserve_metadat...
2023 Mar 07
0
+ ufs-dont-flush-page-immediately-for-dirsync-directories.patch added to mm-unstable branch
...age *page, loff_t pos, unsigned len)
{
struct address_space *mapping = page->mapping;
struct inode *dir = mapping->host;
- int err = 0;
inode_inc_iversion(dir);
block_write_end(NULL, mapping, pos, len, len, page, NULL);
@@ -54,10 +53,16 @@ static int ufs_commit_chunk(struct page
i_size_write(dir, pos+len);
mark_inode_dirty(dir);
}
- if (IS_DIRSYNC(dir))
- err = write_one_page(page);
- else
- unlock_page(page);
+ unlock_page(page);
+}
+
+static int ufs_handle_dirsync(struct inode *dir)
+{
+ int err;
+
+ err = filemap_write_and_wait(dir->i_mapping);
+ if (!err)
+ err = sync_in...