Displaying 9 results from an estimated 9 matches for "first_index".
2011 Jul 12
0
[PATCH] Btrfs: Remove unused variable 'last_index' in file.c
...b8..b061de0 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1059,7 +1059,7 @@ static int prepare_uptodate_page(struct page *page, u64 pos)
static noinline int prepare_pages(struct btrfs_root *root, struct file *file,
struct page **pages, size_t num_pages,
loff_t pos, unsigned long first_index,
- unsigned long last_index, size_t write_bytes)
+ size_t write_bytes)
{
struct extent_state *cached_state = NULL;
int i;
@@ -1159,7 +1159,6 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
struct btrfs_root *root = BTRFS_I(inode)->root;
struct page **pages = N...
2010 Dec 07
9
[PATCH] Btrfs: pwrite blocked when writing from the mmaped buffer of the same page
...to out;
- /*
- * fault pages before locking them in prepare_pages
- * to avoid recursive lock
- */
- if (unlikely(iov_iter_fault_in_readable(&i, write_bytes))) {
- ret = -EFAULT;
- goto out;
- }
-
ret = prepare_pages(root, file, pages, num_pages,
pos, first_index, last_index,
write_bytes);
--
1.6.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
2009 Jul 06
1
[Patch v3] btrfs: use file_remove_suid() after i_mutex is held
...out_nolock;
+ }
+
+ mutex_lock(&inode->i_mutex);
+
err = file_remove_suid(file);
if (err)
- goto out_nolock;
+ goto out;
file_update_time(file);
- pages = kmalloc(nrptrs * sizeof(struct page *), GFP_KERNEL);
-
- mutex_lock(&inode->i_mutex);
BTRFS_I(inode)->sequence++;
first_index = pos >> PAGE_CACHE_SHIFT;
last_index = (pos + count) >> PAGE_CACHE_SHIFT;
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
2008 Jul 03
2
iozone remove_suid oops...
...ssize_t num_written = 0;
ssize_t err = 0;
int ret = 0;
struct inode *inode = fdentry(file)->d_inode;
struct btrfs_root *root = BTRFS_I(inode)->root;
struct page **pages = NULL;
int nrptrs;
struct page *pinned[2];
unsigned long first_index;
unsigned long last_index;
nrptrs = min((count + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE,
PAGE_CACHE_SIZE / (sizeof(struct page *)));
pinned[0] = NULL;
pinned[1] = NULL;
if (file->f_flags & O_DIRECT)
return -EINVAL;...
2013 Nov 06
0
[PATCH v5 5/6] xen/arm: Implement hypercall for dirty page tracing
...*d, unsigned
long gpfn)
return p >> PAGE_SHIFT;
}
+/* Change types across all p2m entries in a domain */
+void p2m_change_entry_type_global(struct domain *d, enum mg nt)
+{
+ struct p2m_domain *p2m = &d->arch.p2m;
+ paddr_t ram_base;
+ int i1, i2, i3;
+ int first_index, second_index, third_index;
+ lpae_t *first = __map_domain_page(p2m->first_level);
+ lpae_t pte, *second = NULL, *third = NULL;
+
+ get_gma_start_end(d, &ram_base, NULL);
+
+ first_index = first_table_offset((uint64_t)ram_base);
+ second_index = second_table_offset((uin...
2009 Jul 06
2
[Patch] btrfs: use file_remove_suid() after i_mutex is held
...ock(&inode->i_mutex);
+
err = file_remove_suid(file);
if (err)
- goto out_nolock;
+ goto out;
file_update_time(file);
pages = kmalloc(nrptrs * sizeof(struct page *), GFP_KERNEL);
+ if (!pages)
+ goto out;
- mutex_lock(&inode->i_mutex);
BTRFS_I(inode)->sequence++;
first_index = pos >> PAGE_CACHE_SHIFT;
last_index = (pos + count) >> PAGE_CACHE_SHIFT;
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
2009 Jul 06
2
[Patch v2] btrfs: use file_remove_suid() after i_mutex is held
...oto out_nolock;
+
+ mutex_lock(&inode->i_mutex);
+
err = file_remove_suid(file);
if (err)
- goto out_nolock;
+ goto out;
file_update_time(file);
- pages = kmalloc(nrptrs * sizeof(struct page *), GFP_KERNEL);
-
- mutex_lock(&inode->i_mutex);
BTRFS_I(inode)->sequence++;
first_index = pos >> PAGE_CACHE_SHIFT;
last_index = (pos + count) >> PAGE_CACHE_SHIFT;
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
2010 May 07
6
[PATCH 1/5] fs: allow short direct-io reads to be completed via buffered IO V2
V1->V2: Check to see if our current ppos is >= i_size after a short DIO read,
just in case it was actually a short read and we need to just return.
This is similar to what already happens in the write case. If we have a short
read while doing O_DIRECT, instead of just returning, fallthrough and try to
read the rest via buffered IO. BTRFS needs this because if we encounter a
compressed or
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
..._mark_buffer_dirty(leaf);
ret = btrfs_del_items(trans, root, path, del_slot, del_nr);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
}
out:
btrfs_free_path(path);
@@ -942,7 +942,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
pinned[0] = grab_cache_page(inode->i_mapping, first_index);
if (!PageUptodate(pinned[0])) {
ret = btrfs_readpage(NULL, pinned[0]);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
wait_on_page_locked(pinned[0]);
} else {
unlock_page(pinned[0]);
@@ -952,7 +952,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
pinned[1] = grab...