linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e2fsprogs: fix build w/o quota
@ 2013-10-18 16:07 Eric Sandeen
  2013-10-22 17:46 ` Eric Sandeen
  2013-10-23 12:51 ` Carlos Maiolino
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Sandeen @ 2013-10-18 16:07 UTC (permalink / raw)
  To: ext4 development

The next branch fails a few ways if quota isn't enabled;
for starters, libquota build was turned off after commit

43075b4 quota: fix disabling quota, add quota tests

because now we don't build libquota, but still depend on it.

Using @QUOTA_CMT@ to comment out those libs fixes things
as far as deps, but then all calls to quota functions fail,
of course.

So this is a very quick & dirty stab at providing stubs
for those functions when quota is disabled.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Note - Compile-tested only, with & without quota.

diff --git a/MCONFIG.in b/MCONFIG.in
index fa2b03e..e6be05c 100644
--- a/MCONFIG.in
+++ b/MCONFIG.in
@@ -93,13 +93,13 @@ LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @PRIVATE_LIBS_CMT@ @SEM_INIT_LIB@
 LIBE2P = $(LIB)/libe2p@LIB_EXT@
 LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
 LIBUUID = @LIBUUID@ @SOCKET_LIB@
-LIBQUOTA = @STATIC_LIBQUOTA@
+@QUOTA_CMT@LIBQUOTA = @STATIC_LIBQUOTA@
 LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID)
 LIBINTL = @LIBINTL@
 DEPLIBSS = $(LIB)/libss@LIB_EXT@
 DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
 DEPLIBUUID = @DEPLIBUUID@
-DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
+@QUOTA_CMT@DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
 DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID)
 
 STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ @DLOPEN_LIB@
@@ -107,12 +107,12 @@ STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ @SEM_INIT_LIB@
 STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@
 STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@
 STATIC_LIBUUID = @STATIC_LIBUUID@ @SOCKET_LIB@
-STATIC_LIBQUOTA = @STATIC_LIBQUOTA@
+@QUOTA_CMT@STATIC_LIBQUOTA = @STATIC_LIBQUOTA@
 STATIC_LIBBLKID = @STATIC_LIBBLKID@ $(STATIC_LIBUUID)
 DEPSTATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
 DEPSTATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@
 DEPSTATIC_LIBUUID = @DEPSTATIC_LIBUUID@
-DEPSTATIC_LIBQUOTA = @DEPSTATIC_LIBQUOTA@
+@QUOTA_CMT@DEPSTATIC_LIBQUOTA = @DEPSTATIC_LIBQUOTA@
 DEPSTATIC_LIBBLKID = @DEPSTATIC_LIBBLKID@ $(DEPSTATIC_LIBUUID)
 
 PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ @DLOPEN_LIB@
@@ -120,12 +120,12 @@ PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ @SEM_INIT_LIB@
 PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@
 PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@
 PROFILED_LIBUUID = @PROFILED_LIBUUID@ @SOCKET_LIB@
-PROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
+@QUOTA_CMT@PROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
 PROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(PROFILED_LIBUUID)
 DEPPROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@
 DEPPROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@
 DEPPROFILED_LIBUUID = @PROFILED_LIBUUID@
-DEPPROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
+@QUOTA_CMT@DEPPROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
 DEPPROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(DEPPROFILED_LIBUUID)
 
 #
diff --git a/lib/quota/mkquota.h b/lib/quota/mkquota.h
index ee15071..2d5d927 100644
--- a/lib/quota/mkquota.h
+++ b/lib/quota/mkquota.h
@@ -43,6 +43,7 @@ struct quota_ctx {
 };
 
 /* In mkquota.c */
+#ifdef CONFIG_QUOTA
 errcode_t quota_init_context(quota_ctx_t *qctx, ext2_filsys fs, int qtype);
 void quota_data_inodes(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
 		int adjust);
@@ -60,5 +61,81 @@ int quota_file_exists(ext2_filsys fs, int qtype, int fmt);
 void quota_set_sb_inum(ext2_filsys fs, ext2_ino_t ino, int qtype);
 errcode_t quota_compare_and_update(quota_ctx_t qctx, int qtype,
 				   int *usage_inconsistent);
+#else
+static inline
+errcode_t quota_init_context(quota_ctx_t *qctx, ext2_filsys fs, int qtype)
+{
+	return 0;
+}
 
+static inline
+void quota_data_inodes(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
+		int adjust)
+{
+	return; 
+}
+
+static inline
+void quota_data_add(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
+		    qsize_t space)
+{
+	return;
+}
+
+static inline
+void quota_data_sub(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
+		    qsize_t space)
+{
+	return;
+}
+
+static inline
+errcode_t quota_write_inode(quota_ctx_t qctx, int qtype)
+{
+	return 0;
+}
+
+static inline
+errcode_t quota_update_limits(quota_ctx_t qctx, ext2_ino_t qf_ino, int type)
+{
+	return 0;
+}
+
+static inline
+errcode_t quota_compute_usage(quota_ctx_t qctx)
+{
+	return 0;
+}
+
+static inline
+void quota_release_context(quota_ctx_t *qctx)
+{
+	return;
+}
+
+static inline
+errcode_t quota_remove_inode(ext2_filsys fs, int qtype)
+{
+	return 0;
+}
+
+static inline
+int quota_file_exists(ext2_filsys fs, int qtype, int fmt)
+{
+	return 0;
+}
+
+static inline
+void quota_set_sb_inum(ext2_filsys fs, ext2_ino_t ino, int qtype)
+{
+	return;
+}
+
+static inline
+errcode_t quota_compare_and_update(quota_ctx_t qctx, int qtype,
+				   int *usage_inconsistent)
+{
+	return 0;
+}
+#endif
 #endif  /* __QUOTA_QUOTAIO_H__ */
diff --git a/lib/quota/quotaio.h b/lib/quota/quotaio.h
index 1c062f1..c2d7a41 100644
--- a/lib/quota/quotaio.h
+++ b/lib/quota/quotaio.h
@@ -158,8 +158,24 @@ void update_grace_times(struct dquot *q);
    than maxlen of extensions[] and fmtnames[] (plus 2) found in quotaio.c */
 #define QUOTA_NAME_LEN 16
 
+#ifdef CONFIG_QUOTA
 const char *quota_get_qf_name(int type, int fmt, char *buf);
 const char *quota_get_qf_path(const char *mntpt, int qtype, int fmt,
 			      char *path_buf, size_t path_buf_size);
+#else
+static inline
+const char *quota_get_qf_name(int type, int fmt, char *buf)
+{
+	return NULL;
+}
+
+static inline
+const char *quota_get_qf_path(const char *mntpt, int qtype, int fmt,
+			      char *path_buf, size_t path_buf_size)
+{
+	return NULL;
+}
+#endif
+
 
 #endif /* GUARD_QUOTAIO_H */


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] e2fsprogs: fix build w/o quota
  2013-10-18 16:07 [PATCH] e2fsprogs: fix build w/o quota Eric Sandeen
@ 2013-10-22 17:46 ` Eric Sandeen
  2013-10-23 12:51 ` Carlos Maiolino
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Sandeen @ 2013-10-22 17:46 UTC (permalink / raw)
  To: ext4 development

On 10/18/13 11:07 AM, Eric Sandeen wrote:
> The next branch fails a few ways if quota isn't enabled;
> for starters, libquota build was turned off after commit
> 
> 43075b4 quota: fix disabling quota, add quota tests

> because now we don't build libquota, but still depend on it.

Any thoughts on this?  Would be super-great to have the git tree
buildable again.  ;)

-Eric
 
> Using @QUOTA_CMT@ to comment out those libs fixes things
> as far as deps, but then all calls to quota functions fail,
> of course.
> 
> So this is a very quick & dirty stab at providing stubs
> for those functions when quota is disabled.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> Note - Compile-tested only, with & without quota.
> 
> diff --git a/MCONFIG.in b/MCONFIG.in
> index fa2b03e..e6be05c 100644
> --- a/MCONFIG.in
> +++ b/MCONFIG.in
> @@ -93,13 +93,13 @@ LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @PRIVATE_LIBS_CMT@ @SEM_INIT_LIB@
>  LIBE2P = $(LIB)/libe2p@LIB_EXT@
>  LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
>  LIBUUID = @LIBUUID@ @SOCKET_LIB@
> -LIBQUOTA = @STATIC_LIBQUOTA@
> +@QUOTA_CMT@LIBQUOTA = @STATIC_LIBQUOTA@
>  LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID)
>  LIBINTL = @LIBINTL@
>  DEPLIBSS = $(LIB)/libss@LIB_EXT@
>  DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
>  DEPLIBUUID = @DEPLIBUUID@
> -DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
> +@QUOTA_CMT@DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
>  DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID)
>  
>  STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ @DLOPEN_LIB@
> @@ -107,12 +107,12 @@ STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ @SEM_INIT_LIB@
>  STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@
>  STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@
>  STATIC_LIBUUID = @STATIC_LIBUUID@ @SOCKET_LIB@
> -STATIC_LIBQUOTA = @STATIC_LIBQUOTA@
> +@QUOTA_CMT@STATIC_LIBQUOTA = @STATIC_LIBQUOTA@
>  STATIC_LIBBLKID = @STATIC_LIBBLKID@ $(STATIC_LIBUUID)
>  DEPSTATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
>  DEPSTATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@
>  DEPSTATIC_LIBUUID = @DEPSTATIC_LIBUUID@
> -DEPSTATIC_LIBQUOTA = @DEPSTATIC_LIBQUOTA@
> +@QUOTA_CMT@DEPSTATIC_LIBQUOTA = @DEPSTATIC_LIBQUOTA@
>  DEPSTATIC_LIBBLKID = @DEPSTATIC_LIBBLKID@ $(DEPSTATIC_LIBUUID)
>  
>  PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ @DLOPEN_LIB@
> @@ -120,12 +120,12 @@ PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ @SEM_INIT_LIB@
>  PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@
>  PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@
>  PROFILED_LIBUUID = @PROFILED_LIBUUID@ @SOCKET_LIB@
> -PROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
> +@QUOTA_CMT@PROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
>  PROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(PROFILED_LIBUUID)
>  DEPPROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@
>  DEPPROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@
>  DEPPROFILED_LIBUUID = @PROFILED_LIBUUID@
> -DEPPROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
> +@QUOTA_CMT@DEPPROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
>  DEPPROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(DEPPROFILED_LIBUUID)
>  
>  #
> diff --git a/lib/quota/mkquota.h b/lib/quota/mkquota.h
> index ee15071..2d5d927 100644
> --- a/lib/quota/mkquota.h
> +++ b/lib/quota/mkquota.h
> @@ -43,6 +43,7 @@ struct quota_ctx {
>  };
>  
>  /* In mkquota.c */
> +#ifdef CONFIG_QUOTA
>  errcode_t quota_init_context(quota_ctx_t *qctx, ext2_filsys fs, int qtype);
>  void quota_data_inodes(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
>  		int adjust);
> @@ -60,5 +61,81 @@ int quota_file_exists(ext2_filsys fs, int qtype, int fmt);
>  void quota_set_sb_inum(ext2_filsys fs, ext2_ino_t ino, int qtype);
>  errcode_t quota_compare_and_update(quota_ctx_t qctx, int qtype,
>  				   int *usage_inconsistent);
> +#else
> +static inline
> +errcode_t quota_init_context(quota_ctx_t *qctx, ext2_filsys fs, int qtype)
> +{
> +	return 0;
> +}
>  
> +static inline
> +void quota_data_inodes(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
> +		int adjust)
> +{
> +	return; 
> +}
> +
> +static inline
> +void quota_data_add(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
> +		    qsize_t space)
> +{
> +	return;
> +}
> +
> +static inline
> +void quota_data_sub(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
> +		    qsize_t space)
> +{
> +	return;
> +}
> +
> +static inline
> +errcode_t quota_write_inode(quota_ctx_t qctx, int qtype)
> +{
> +	return 0;
> +}
> +
> +static inline
> +errcode_t quota_update_limits(quota_ctx_t qctx, ext2_ino_t qf_ino, int type)
> +{
> +	return 0;
> +}
> +
> +static inline
> +errcode_t quota_compute_usage(quota_ctx_t qctx)
> +{
> +	return 0;
> +}
> +
> +static inline
> +void quota_release_context(quota_ctx_t *qctx)
> +{
> +	return;
> +}
> +
> +static inline
> +errcode_t quota_remove_inode(ext2_filsys fs, int qtype)
> +{
> +	return 0;
> +}
> +
> +static inline
> +int quota_file_exists(ext2_filsys fs, int qtype, int fmt)
> +{
> +	return 0;
> +}
> +
> +static inline
> +void quota_set_sb_inum(ext2_filsys fs, ext2_ino_t ino, int qtype)
> +{
> +	return;
> +}
> +
> +static inline
> +errcode_t quota_compare_and_update(quota_ctx_t qctx, int qtype,
> +				   int *usage_inconsistent)
> +{
> +	return 0;
> +}
> +#endif
>  #endif  /* __QUOTA_QUOTAIO_H__ */
> diff --git a/lib/quota/quotaio.h b/lib/quota/quotaio.h
> index 1c062f1..c2d7a41 100644
> --- a/lib/quota/quotaio.h
> +++ b/lib/quota/quotaio.h
> @@ -158,8 +158,24 @@ void update_grace_times(struct dquot *q);
>     than maxlen of extensions[] and fmtnames[] (plus 2) found in quotaio.c */
>  #define QUOTA_NAME_LEN 16
>  
> +#ifdef CONFIG_QUOTA
>  const char *quota_get_qf_name(int type, int fmt, char *buf);
>  const char *quota_get_qf_path(const char *mntpt, int qtype, int fmt,
>  			      char *path_buf, size_t path_buf_size);
> +#else
> +static inline
> +const char *quota_get_qf_name(int type, int fmt, char *buf)
> +{
> +	return NULL;
> +}
> +
> +static inline
> +const char *quota_get_qf_path(const char *mntpt, int qtype, int fmt,
> +			      char *path_buf, size_t path_buf_size)
> +{
> +	return NULL;
> +}
> +#endif
> +
>  
>  #endif /* GUARD_QUOTAIO_H */
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] e2fsprogs: fix build w/o quota
  2013-10-18 16:07 [PATCH] e2fsprogs: fix build w/o quota Eric Sandeen
  2013-10-22 17:46 ` Eric Sandeen
@ 2013-10-23 12:51 ` Carlos Maiolino
  2013-10-23 15:22   ` Theodore Ts'o
  1 sibling, 1 reply; 9+ messages in thread
From: Carlos Maiolino @ 2013-10-23 12:51 UTC (permalink / raw)
  To: ext4 development

Hey Eric,

I did a test here building the e2fsprogs -next tree without quota support and I
didn't have any problems configuring and compiling it. Can you share the test
you did and failed?

just as a matter of information, my 'next' branch should be up2date:

[cem@orion misc]$ git log --pretty=oneline -2
1586850bcd716e7e99825bd0a9a138f8618e2305 Merge branch 'maint' into next
43075b42bdff509cc567bd870a32072edf05d04c quota: fix disabling quota, add quota
tests


Cheers,

The latest commit on the tree is 
On Fri, Oct 18, 2013 at 11:07:28AM -0500, Eric Sandeen wrote:
> The next branch fails a few ways if quota isn't enabled;
> for starters, libquota build was turned off after commit
> 
> 43075b4 quota: fix disabling quota, add quota tests
> 
> because now we don't build libquota, but still depend on it.
> 
> Using @QUOTA_CMT@ to comment out those libs fixes things
> as far as deps, but then all calls to quota functions fail,
> of course.
> 
> So this is a very quick & dirty stab at providing stubs
> for those functions when quota is disabled.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> Note - Compile-tested only, with & without quota.
> 
> diff --git a/MCONFIG.in b/MCONFIG.in
> index fa2b03e..e6be05c 100644
> --- a/MCONFIG.in
> +++ b/MCONFIG.in
> @@ -93,13 +93,13 @@ LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @PRIVATE_LIBS_CMT@ @SEM_INIT_LIB@
>  LIBE2P = $(LIB)/libe2p@LIB_EXT@
>  LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
>  LIBUUID = @LIBUUID@ @SOCKET_LIB@
> -LIBQUOTA = @STATIC_LIBQUOTA@
> +@QUOTA_CMT@LIBQUOTA = @STATIC_LIBQUOTA@
>  LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID)
>  LIBINTL = @LIBINTL@
>  DEPLIBSS = $(LIB)/libss@LIB_EXT@
>  DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
>  DEPLIBUUID = @DEPLIBUUID@
> -DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
> +@QUOTA_CMT@DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
>  DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID)
>  
>  STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ @DLOPEN_LIB@
> @@ -107,12 +107,12 @@ STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ @SEM_INIT_LIB@
>  STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@
>  STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@
>  STATIC_LIBUUID = @STATIC_LIBUUID@ @SOCKET_LIB@
> -STATIC_LIBQUOTA = @STATIC_LIBQUOTA@
> +@QUOTA_CMT@STATIC_LIBQUOTA = @STATIC_LIBQUOTA@
>  STATIC_LIBBLKID = @STATIC_LIBBLKID@ $(STATIC_LIBUUID)
>  DEPSTATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
>  DEPSTATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@
>  DEPSTATIC_LIBUUID = @DEPSTATIC_LIBUUID@
> -DEPSTATIC_LIBQUOTA = @DEPSTATIC_LIBQUOTA@
> +@QUOTA_CMT@DEPSTATIC_LIBQUOTA = @DEPSTATIC_LIBQUOTA@
>  DEPSTATIC_LIBBLKID = @DEPSTATIC_LIBBLKID@ $(DEPSTATIC_LIBUUID)
>  
>  PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ @DLOPEN_LIB@
> @@ -120,12 +120,12 @@ PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ @SEM_INIT_LIB@
>  PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@
>  PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@
>  PROFILED_LIBUUID = @PROFILED_LIBUUID@ @SOCKET_LIB@
> -PROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
> +@QUOTA_CMT@PROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
>  PROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(PROFILED_LIBUUID)
>  DEPPROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@
>  DEPPROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@
>  DEPPROFILED_LIBUUID = @PROFILED_LIBUUID@
> -DEPPROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
> +@QUOTA_CMT@DEPPROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
>  DEPPROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(DEPPROFILED_LIBUUID)
>  
>  #
> diff --git a/lib/quota/mkquota.h b/lib/quota/mkquota.h
> index ee15071..2d5d927 100644
> --- a/lib/quota/mkquota.h
> +++ b/lib/quota/mkquota.h
> @@ -43,6 +43,7 @@ struct quota_ctx {
>  };
>  
>  /* In mkquota.c */
> +#ifdef CONFIG_QUOTA
>  errcode_t quota_init_context(quota_ctx_t *qctx, ext2_filsys fs, int qtype);
>  void quota_data_inodes(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
>  		int adjust);
> @@ -60,5 +61,81 @@ int quota_file_exists(ext2_filsys fs, int qtype, int fmt);
>  void quota_set_sb_inum(ext2_filsys fs, ext2_ino_t ino, int qtype);
>  errcode_t quota_compare_and_update(quota_ctx_t qctx, int qtype,
>  				   int *usage_inconsistent);
> +#else
> +static inline
> +errcode_t quota_init_context(quota_ctx_t *qctx, ext2_filsys fs, int qtype)
> +{
> +	return 0;
> +}
>  
> +static inline
> +void quota_data_inodes(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
> +		int adjust)
> +{
> +	return; 
> +}
> +
> +static inline
> +void quota_data_add(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
> +		    qsize_t space)
> +{
> +	return;
> +}
> +
> +static inline
> +void quota_data_sub(quota_ctx_t qctx, struct ext2_inode *inode, ext2_ino_t ino,
> +		    qsize_t space)
> +{
> +	return;
> +}
> +
> +static inline
> +errcode_t quota_write_inode(quota_ctx_t qctx, int qtype)
> +{
> +	return 0;
> +}
> +
> +static inline
> +errcode_t quota_update_limits(quota_ctx_t qctx, ext2_ino_t qf_ino, int type)
> +{
> +	return 0;
> +}
> +
> +static inline
> +errcode_t quota_compute_usage(quota_ctx_t qctx)
> +{
> +	return 0;
> +}
> +
> +static inline
> +void quota_release_context(quota_ctx_t *qctx)
> +{
> +	return;
> +}
> +
> +static inline
> +errcode_t quota_remove_inode(ext2_filsys fs, int qtype)
> +{
> +	return 0;
> +}
> +
> +static inline
> +int quota_file_exists(ext2_filsys fs, int qtype, int fmt)
> +{
> +	return 0;
> +}
> +
> +static inline
> +void quota_set_sb_inum(ext2_filsys fs, ext2_ino_t ino, int qtype)
> +{
> +	return;
> +}
> +
> +static inline
> +errcode_t quota_compare_and_update(quota_ctx_t qctx, int qtype,
> +				   int *usage_inconsistent)
> +{
> +	return 0;
> +}
> +#endif
>  #endif  /* __QUOTA_QUOTAIO_H__ */
> diff --git a/lib/quota/quotaio.h b/lib/quota/quotaio.h
> index 1c062f1..c2d7a41 100644
> --- a/lib/quota/quotaio.h
> +++ b/lib/quota/quotaio.h
> @@ -158,8 +158,24 @@ void update_grace_times(struct dquot *q);
>     than maxlen of extensions[] and fmtnames[] (plus 2) found in quotaio.c */
>  #define QUOTA_NAME_LEN 16
>  
> +#ifdef CONFIG_QUOTA
>  const char *quota_get_qf_name(int type, int fmt, char *buf);
>  const char *quota_get_qf_path(const char *mntpt, int qtype, int fmt,
>  			      char *path_buf, size_t path_buf_size);
> +#else
> +static inline
> +const char *quota_get_qf_name(int type, int fmt, char *buf)
> +{
> +	return NULL;
> +}
> +
> +static inline
> +const char *quota_get_qf_path(const char *mntpt, int qtype, int fmt,
> +			      char *path_buf, size_t path_buf_size)
> +{
> +	return NULL;
> +}
> +#endif
> +
>  
>  #endif /* GUARD_QUOTAIO_H */
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Carlos

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] e2fsprogs: fix build w/o quota
  2013-10-23 12:51 ` Carlos Maiolino
@ 2013-10-23 15:22   ` Theodore Ts'o
  2013-10-23 16:29     ` Eric Sandeen
  0 siblings, 1 reply; 9+ messages in thread
From: Theodore Ts'o @ 2013-10-23 15:22 UTC (permalink / raw)
  To: ext4 development

On Wed, Oct 23, 2013 at 10:51:48AM -0200, Carlos Maiolino wrote:
> Hey Eric,
> 
> I did a test here building the e2fsprogs -next tree without quota support and I
> didn't have any problems configuring and compiling it. Can you share the test
> you did and failed?
> 

I've been able to replicate the problem. You may need to rm -rf your
build directory and then run from scratch to see it.

Sorry for not responding sooner; I'm in Edinburgh this week and in
conference mode.

The reason why we have continud building libquota even when libsupport
is not defined is because the plan is to rename libquota to libsupport
once 1.42.x is released.  Libquota/libsupport is desinged to never be
built as a shared library, and the idea is to move things like
e2fsck/profile.c which is used by e2fsck and mke2fs, into libsupport.
The rational for that is that the functions in libquota are already
horribly e2fsprogs specific and aren't really set up to be usable as a
generic quota support library.  So we might as well make it be a
standardized place for internal support functions used by multiple
e2fsprogs programs.

I'll try to find a fix that minimizes deltas between the maint branch
and the next branch.

Cheers,

					- Ted

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] e2fsprogs: fix build w/o quota
  2013-10-23 15:22   ` Theodore Ts'o
@ 2013-10-23 16:29     ` Eric Sandeen
  2013-10-23 16:53       ` [PATCH] Fix noquota build Theodore Ts'o
  2013-10-24 13:20       ` [PATCH] e2fsprogs: fix build w/o quota Carlos Maiolino
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Sandeen @ 2013-10-23 16:29 UTC (permalink / raw)
  To: Theodore Ts'o, ext4 development

On 10/23/13 10:22 AM, Theodore Ts'o wrote:
> On Wed, Oct 23, 2013 at 10:51:48AM -0200, Carlos Maiolino wrote:
>> Hey Eric,
>>
>> I did a test here building the e2fsprogs -next tree without quota support and I
>> didn't have any problems configuring and compiling it. Can you share the test
>> you did and failed?
>>
> 
> I've been able to replicate the problem. You may need to rm -rf your
> build directory and then run from scratch to see it.

yes, make clean doesn't remove it, even git clean doesn't; it's in
.gitignore (why?)

> Sorry for not responding sooner; I'm in Edinburgh this week and in
> conference mode.

no problem, I guess that's why I asked :)

> The reason why we have continud building libquota even when libsupport
> is not defined is because the plan is to rename libquota to libsupport
> once 1.42.x is released.  Libquota/libsupport is desinged to never be
> built as a shared library, and the idea is to move things like
> e2fsck/profile.c which is used by e2fsck and mke2fs, into libsupport.
> The rational for that is that the functions in libquota are already
> horribly e2fsprogs specific and aren't really set up to be usable as a
> generic quota support library.  So we might as well make it be a
> standardized place for internal support functions used by multiple
> e2fsprogs programs.
> 
> I'll try to find a fix that minimizes deltas between the maint branch
> and the next branch.

Maybe just revert part of "quota: fix disabling quota, add quota tests" ?

Did that actually do more good than harm?

-Eric

> Cheers,
> 
> 					- Ted
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] Fix noquota build
  2013-10-23 16:29     ` Eric Sandeen
@ 2013-10-23 16:53       ` Theodore Ts'o
  2013-10-23 16:55         ` Eric Sandeen
  2013-10-24 13:20       ` [PATCH] e2fsprogs: fix build w/o quota Carlos Maiolino
  1 sibling, 1 reply; 9+ messages in thread
From: Theodore Ts'o @ 2013-10-23 16:53 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: sandeen, Theodore Ts'o

We need to build libquota even if the quota code is disabled.  This
fixes a build regression introduced by commit 43075b42bd: 'quota: fix
disabling quota, add quota tests".

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 95cbf1b..ef79482 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -26,7 +26,7 @@ export CHECK_CMD
 @DEBUGFS_CMT@DEBUGFS_DIR= debugfs
 @UUID_CMT@UUID_LIB_SUBDIR= lib/uuid
 @BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid
-@QUOTA_CMT@QUOTA_LIB_SUBDIR= lib/quota
+QUOTA_LIB_SUBDIR= lib/quota
 
 LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) lib/ext2fs $(BLKID_LIB_SUBDIR) $(QUOTA_LIB_SUBDIR) intl
 PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
-- 
1.7.12.rc0.22.gcdd159b


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] Fix noquota build
  2013-10-23 16:53       ` [PATCH] Fix noquota build Theodore Ts'o
@ 2013-10-23 16:55         ` Eric Sandeen
  2013-10-24  0:41           ` Theodore Ts'o
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2013-10-23 16:55 UTC (permalink / raw)
  To: Theodore Ts'o, Ext4 Developers List

On 10/23/13 11:53 AM, Theodore Ts'o wrote:
> We need to build libquota even if the quota code is disabled.  This
> fixes a build regression introduced by commit 43075b42bd: 'quota: fix
> disabling quota, add quota tests".
> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Should work.  Thanks Ted.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

(if you want to push it out, I'll do a coverity scan so we
can make sure we're not going backwards there, too; this bug
has been preventing those for the past week or so).

-Eric

> ---
>  Makefile.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile.in b/Makefile.in
> index 95cbf1b..ef79482 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -26,7 +26,7 @@ export CHECK_CMD
>  @DEBUGFS_CMT@DEBUGFS_DIR= debugfs
>  @UUID_CMT@UUID_LIB_SUBDIR= lib/uuid
>  @BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid
> -@QUOTA_CMT@QUOTA_LIB_SUBDIR= lib/quota
> +QUOTA_LIB_SUBDIR= lib/quota
>  
>  LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) lib/ext2fs $(BLKID_LIB_SUBDIR) $(QUOTA_LIB_SUBDIR) intl
>  PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Fix noquota build
  2013-10-23 16:55         ` Eric Sandeen
@ 2013-10-24  0:41           ` Theodore Ts'o
  0 siblings, 0 replies; 9+ messages in thread
From: Theodore Ts'o @ 2013-10-24  0:41 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Ext4 Developers List

I've pushed out the fixups to the e2fsprogs tree.

     	    	    	      	  - Ted

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] e2fsprogs: fix build w/o quota
  2013-10-23 16:29     ` Eric Sandeen
  2013-10-23 16:53       ` [PATCH] Fix noquota build Theodore Ts'o
@ 2013-10-24 13:20       ` Carlos Maiolino
  1 sibling, 0 replies; 9+ messages in thread
From: Carlos Maiolino @ 2013-10-24 13:20 UTC (permalink / raw)
  To: ext4 development


On Wed, Oct 23, 2013 at 11:29:06AM -0500, Eric Sandeen wrote:
> On 10/23/13 10:22 AM, Theodore Ts'o wrote:
> > On Wed, Oct 23, 2013 at 10:51:48AM -0200, Carlos Maiolino wrote:
> >> Hey Eric,
> >>
> >> I did a test here building the e2fsprogs -next tree without quota support and I
> >> didn't have any problems configuring and compiling it. Can you share the test
> >> you did and failed?
> >>
> > 
> > I've been able to replicate the problem. You may need to rm -rf your
> > build directory and then run from scratch to see it.
> 
> yes, make clean doesn't remove it, even git clean doesn't; it's in
> .gitignore (why?)
> 

Yes, that's why it wasn't failing :)

Thanks guys

> > Sorry for not responding sooner; I'm in Edinburgh this week and in
> > conference mode.
> 
> no problem, I guess that's why I asked :)
> 
> > The reason why we have continud building libquota even when libsupport
> > is not defined is because the plan is to rename libquota to libsupport
> > once 1.42.x is released.  Libquota/libsupport is desinged to never be
> > built as a shared library, and the idea is to move things like
> > e2fsck/profile.c which is used by e2fsck and mke2fs, into libsupport.
> > The rational for that is that the functions in libquota are already
> > horribly e2fsprogs specific and aren't really set up to be usable as a
> > generic quota support library.  So we might as well make it be a
> > standardized place for internal support functions used by multiple
> > e2fsprogs programs.
> > 
> > I'll try to find a fix that minimizes deltas between the maint branch
> > and the next branch.
> 
> Maybe just revert part of "quota: fix disabling quota, add quota tests" ?
> 
> Did that actually do more good than harm?
> 
> -Eric
> 
> > Cheers,
> > 
> > 					- Ted
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Carlos

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-24 13:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-18 16:07 [PATCH] e2fsprogs: fix build w/o quota Eric Sandeen
2013-10-22 17:46 ` Eric Sandeen
2013-10-23 12:51 ` Carlos Maiolino
2013-10-23 15:22   ` Theodore Ts'o
2013-10-23 16:29     ` Eric Sandeen
2013-10-23 16:53       ` [PATCH] Fix noquota build Theodore Ts'o
2013-10-23 16:55         ` Eric Sandeen
2013-10-24  0:41           ` Theodore Ts'o
2013-10-24 13:20       ` [PATCH] e2fsprogs: fix build w/o quota Carlos Maiolino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).