Displaying 20 results from an estimated 400 matches similar to: "[PATCH] Null terminate strings passed in from userspace"
2009 Jan 19
4
[Patch] Btrfs: use BTRFS_VOL_NAME_MAX for struct btrfs_ioctl_vol_args
I found userspace tool, btrfsctl, uses BTRFS_VOL_NAME_MAX, and
it also looks that this one is more proper.
Kill BTRFS_PATH_NAME_MAX since no one will use it.
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Chris Mason <chris.mason@oracle.com>
---
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index c2aa33e..f229950 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -472,7
2007 Sep 20
0
[patch]use strnlen to deal with string from user space
Hello
I think strlen is unsafe here
Regards
YZ
diff -r 24c661119092 inode.c
--- a/inode.c Mon Sep 17 11:25:58 2007 -0400
+++ b/inode.c Thu Sep 20 22:25:34 2007 +0800
@@ -1985,7 +1988,7 @@ static int btrfs_ioctl_snap_create(struc
if (copy_from_user(&vol_args, arg, sizeof(vol_args)))
return -EFAULT;
- namelen = strlen(vol_args.name);
+ namelen = strnlen(vol_args.name,
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
>From 03115f064be2e074d84f4e2105d2cdebde10f6ba Mon Sep 17 00:00:00 2001
From: Yi Yang <yi.y.yang at intel.com>
Date: Tue, 12 Jul 2011 14:53:50 +0800
Subject: [PATCH] Use a general way to get the default subvolume for btrfs
---
extlinux/btrfs.h | 105 +++++++++++++++++++
extlinux/main.c | 304 ++++++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 377 insertions(+),
2010 Mar 22
5
[PATCH 0/5] asynchronous commit, snapshot ponies
Hi everyone,
This patchset is the latest approach I''m using for the Ceph storage daemon to
keep track of which data has safely committed to disk. The basic idea is to
not use the (problematic) user transaction ioctls at all. Instead, the daemon
quiesces its own write requests, initiates an async snapshot, and then
continues.
The snapshot approach is nice because it provides rollback.
2014 Apr 23
0
[PATCH 001/001] btrfs: Mechanism to modify the permission of a subvolume
From: Ajesh JS <ajesh.js@hp.com>
This patch provides a mechanism to modify the permission of a subvolume in a btrfs file system
This helps to apply a policy of having read-write subvolume inside a read-only subvolume.
One use case is to have the whole root file system as a read-only subvolume and have /etc as a read-write subvolume inside.
Signed-off-by: Ajesh JS <ajesh.js@hp.com>
2009 Mar 20
1
[PATCH 2/4] Btrfs: clean up find_free_extent
The whole loop=0,1,2 thing was kind of odd and not very self explanatory. I''ve
replaced it with a list_for_each_entry on space_info->block_groups. If we have
a hint we just jump into the loop with the block group and start looking for
space. If we don''t find anything we start at the beginning and start looking.
We never come out of the loop with a ref on the block_group
2011 Aug 23
40
[PATCH 00/21] [RFC] Btrfs: restriper
Hello,
This patch series adds an initial implementation of restriper (it''s a
clever name for relocation framework that allows to do selective profile
changing and selective balancing with some goodies like pausing/resuming
and reporting progress to the user.
Profile changing is global (per-FS) so far, per-subvolume profiles
require some discussion and can be implemented in future.
2012 Mar 15
0
[PATCH] Btrfs: fix deadlock during allocating chunks
This deadlock comes from xfstests 251.
We''ll hold the chunk_mutex throughout the whole of a chunk allocation.
But if we find that we''ve used up system chunk space, we need to allocate a
new system chunk, but this will lead to a recursion of chunk allocation and end
up with a deadlock on chunk_mutex.
So instead we need to allocate the system chunk first if we find we''re
2013 Oct 25
8
[PATCH] btrfs: add framework to read fs info from btrfs-control
This adds ioctl BTRFS_IOC_GET_FSIDS which reads the fs
info through the btrfs-control
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/super.c | 47 ++++++++++++++++++++++++++++++++++++++-----
fs/btrfs/volumes.c | 33 ++++++++++++++++++++++++++++++
fs/btrfs/volumes.h | 2 +
include/uapi/linux/btrfs.h | 19 +++++++++++++++++
4 files changed,
2010 Oct 25
2
[PATCH] Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed
Add a mount option user_subvol_rm_allowed that allows users to delete a
(potentially non-empty!) subvol when they would otherwise we allowed to do
an rmdir(2). We duplicate the may_delete() checks from the core VFS code
to implement identical security checks (minus the directory size check).
Signed-off-by: Sage Weil <sage@newdream.net>
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/ioctl.c |
2010 Oct 25
14
[PATCH 0/6] Btrfs commit fixes, async subvol operations
Hi Chris,
This is the extent of my current queue of Btrfs snapshot/subvol/commit
stuff. Most of these were posted several months ago. Can be sent
upstream during this merge window? Not having this functionality is
becoming a bit of a roadblock for our efforts to keep the Ceph data in a
consistent state.
These patches are also available from
2009 Jun 13
1
[PATCH 1/3] Add ioctl to set per file 'compress' flag
An ioctl is needed to set compress flag (i.e. clear
BTRFS_INODE_NOCOMPRESS flag) on per file basis. This patch adds that.
Introduces a generic function to be used by subsequent patches.
Signed-off-by: Amit Gud <gud@ksu.edu>
Index: newformat2/fs/btrfs/ioctl.c
===================================================================
--- newformat2.orig/fs/btrfs/ioctl.c
+++
2011 Feb 07
18
[PATCH] Btrfs-progs use safe string manipulation functions
Please find the attached patch which replace unsafe strcpy(3) by
strncpy(3) functions.
regards,
Eduardo Silva
2012 Jan 11
12
[PATCH 00/11] Btrfs: some patches for 3.3
The biggest one is a fix for fstrim, and there''s a fix for on-disk
free space cache. Others are small fixes and cleanups.
The last three have been sent weeks ago.
The patchset is also available in this repo:
git://repo.or.cz/linux-btrfs-devel.git for-chris
Note there''s a small confict with Al Viro''s vfs changes.
Li Zefan (11):
Btrfs: add pinned extents to
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
Document those places in the btrfs code which are BUGing on non-fatal error
conditions that should be handled by proper error paths. This makes it
easier to distinguish between what needs fixing versus which BUG_ON''s we
might want to keep (to trap code bugs, unexpected inconsistencies, etc).
Do this with a trivial macro, ''btrfs_fixable_bug_on'' which just defines to
2011 Jul 18
5
[PATCH v3 0/5] btrfs-progs: scrub interface
This is the next patch series for scrub userland tools.
Change log v1->v2:
- commands now reachable as "btrfs scrub ..." instead of "btrfs filesystem
scrub ..."
- ability to scrub a single device instead of a whole file system
- superfluous command line options removed
- resume is now a separate command ("scrub resume") instead of "scrub start -r"
-
2010 Dec 14
0
[PATCH] BTRFS_IOC_TREE_SEARCH: store and use the last key found
Hi all,
following the thread about the BTRFS_IOC_TREE_SEARCH ioctl [1], I made a patch
which try to address the problem of restarting the ioctl.
In the current solution is the application during the restart of the search to
fill the min_* fields in the "struct btrfs_ioctl_search_key". In general the
values set are the last one returned "+1". But doing so we reduce the
2013 Mar 21
4
[PATCH] btrfs-progs: make btrfs dev scan multi path aware
We should avoid using non multi-path (mp) path for mp disks
As of now there is no good way (like api) to check that.
A workaround way is to check if the O_EXCL open is unsuccessful.
This is safe since otherwise the BTRFS_IOC_SCAN_DEV ioctl would
fail if the disk-path can not be opened with the flag O_EXCL set.
This patch also includes some (error) print format changes related
to the btrfs
2009 Jul 07
1
Ghost file.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I mentioned a ghost file. Here is the dump (less than 65M):
http://dev.mccme.ru/~raskin/btrfs.dump
ghost file is:
885dj1l4788pymp3bk2f3dz52ggcvw4v-empty/garbage-1/mwave.h.tmp-31838-1822528541
It has a name, but stat fails (so no inode, I guess). Also I can create
another file with the same name in the directory. I cannot remove the
file, or
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible
to limit subvolumes and any group of subvolumes and also to track the amount
of space that will get freed when deleting snapshots.
The current version is functionally incomplete, with the main missing feature
being the initial scan and rescan of an existing filesystem.
I put some effort into writing an introduction into