| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: Any better way to interact with xfs? |
| From: | Amir Goldstein <amir73il@xxxxxxxxx> |
| Date: | Sat, 30 Jul 2016 17:26:03 +0300 |
| Cc: | Ryan Lindsay <rlindsay@xxxxxxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=iBZkSYtoVSz6fXdR2AM2EwPeaNNUhHq2GQiKhWW9bhw=; b=MwFCVHL1x+XtiIcmNh+I721LZYv9a3n7jyqQy/6KjMY8C5bXM4FrggLNYLEDhBQwL1 +YNvjQJkdzz4pyJQuDmN78RXipMgW521aFMJifwTai3zi80vS5+5zoTb6CmJl6nmcF9s aXvDfSdrgEKNqL4CVEgrwUZEvXeVO1BTQrhGecythuZYJr4XGXfLH0aJ78IrZxz61QfG 3dt7Xx6mRbQGm2CKGg6qfso4fA54AmTyoRnT0B3e1eupdIwAr40xpjF04lmalWAZuDjp 9Hiu70zwRV1gCWQ6HTDu4r1dN+Bq0n5rZVDlVCXvSCojfL5i7GZabwBJ6rLVE+fXXKXC gk9Q== |
| In-reply-to: | <20160729022552.GA16044@dastard> |
| References: | <SYXPR01MB044863A851C967C37649BE3FF8000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <CAOQ4uxiOavjc+wrRQHW8U16EDocNRRGnM24a7d6dhO8tzV0a1w@xxxxxxxxxxxxxx> <20160729022552.GA16044@dastard> |
On Fri, Jul 29, 2016 at 5:25 AM, Dave Chinner <david@xxxxxxxxxxxxx> wrote: > On Thu, Jul 28, 2016 at 09:48:07AM +0300, Amir Goldstein wrote: >> Hi Ryan, >> >> You could use the XFS_IOC_FSINUMBERS/XFS_IOC_FSBULKSTAT API to iterate >> over all inodes in the fs. > > That's a read-only API - you can't use it to change the inodes > on disk. > >> not having to readdir and recourse the directory tree should safe you >> some time (much less i/o). >> Also, the interface can be used to make your conversion work parallel >> by working on different inode ranges. > > It cannot be used to make coherent, atomic changes to the inode > state. > I'm curios: In theory, one can construct a file_handle from bulkstat info. correct? and one could use that handle to open_by_handle_at() and fchown(). right? I realize that both APIs were not intended for this use case, but I wonder: 1. can it be done? 2. what are the possible consequences? 3. what do you mean by "coherent, atomic changes to the inode state"? does it not play well with the dentry/inode cache? >> You can use xfsdump/xfsrestore code as reference. > > xfsdump uses bulkstat scan and read inodes, not change anything on > disk. > > Cheers, > > Dave. > -- > Dave Chinner > david@xxxxxxxxxxxxx |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH xfsprogs 2/2] linux.h: Define xfs_off_t as int64_t, Felix Janda |
|---|---|
| Next by Date: | Re: [PATCH xfsprogs 2/2] linux.h: Define xfs_off_t as int64_t, Eric Sandeen |
| Previous by Thread: | Re: Any better way to interact with xfs?, Dave Chinner |
| Next by Thread: | Re: Any better way to interact with xfs?, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |