Re: [PATCH 06/22] xfs: refactor kernel-specific parts of xfs_ialloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 17, 2019 at 11:17:08PM -0800, Christoph Hellwig wrote:
> On Thu, Jan 17, 2019 at 03:28:08PM -0800, Darrick J. Wong wrote:
> > > This is just too ugly and pointless.  Can you explain (or even better
> > > show code) why we really need this for xfsprogs?
> > 
> > To avoid having a useless lock_flags argument to xfs_iget in userspace?
> > It wasn't so long ago that Eric removed it, but I don't mind adding it
> > back to avoid this kind of ugliness.
> 
> I'd rather have prototypes match in userspace then working around
> mismatches in the kernel.

The other thing about the userspace iget is that you can pass in a
custom set of inode fork verifiers.  xfs_repair uses this to deal with
broken '..' pointers by leaving them unfixed until phase 6, at which
point it knows enough to reset the pointer, but then wants to be able to
iget the directory to fix it.

We could work around that with a libxfs_iget_fork_ops variant so that
xfs_iget remains the same between kernel and userspace.  How about that?

> > The mkfs protofile platform_init also has some code to set other
> > attributes from a struct fsxattr, but I think I can just set them once
> > the inode allocation function returns to the protofile code.
> 
> And we are killing that anyway, right?

Yeah.  I think?  Eric? :)

--D



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux